Skip to content

Instantly share code, notes, and snippets.

What would you like to do?
class MainActivity : AppCompatActivity() {
override fun onCreate(savedInstanceState: Bundle?) {
// Other Methods
private val simpleContractRegistration = registerForActivityResult(SimpleContract()) {resultStr ->
if (resultStr == null)
Toast.makeText(this, "Nothing selected / User Cancelled", Toast.LENGTH_SHORT).show()
Toast.makeText(this, "Selected value is $resultStr", Toast.LENGTH_SHORT).show()
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
You can’t perform that action at this time.