Created
March 31, 2020 09:56
-
-
Save NikolaDespotoski/906f25a6e2fb858f39bd69b1660a95b5 to your computer and use it in GitHub Desktop.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
fun <I, O> prepareCall(activityResultContractor: ActivityResultContractor<I, O>,activityResultCallback: ActivityResultCallback<O>) | |
: ActivityResultLauncher<I> = prepareCall(object : ActivityResultContract<I, O>() { | |
override fun createIntent(input: I): Intent = activityResultContractor.createIntent(input) | |
override fun parseResult(resultCode: Int, intent: Intent?): O = activityResultContractor.parseResult(resultCode, intent) | |
}, activityResultCallback) | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment