androidx.activity.result
Interfaces
ActivityResultCallback |
A type-safe callback to be called when an |
ActivityResultCaller |
A class that can call Activity#startActivityForResult-style APIs without having to manage request codes, and converting request/response to an |
ActivityResultRegistryOwner |
A class that has an |
Classes
ActivityResult |
A container for an activity result as obtained form |
ActivityResultLauncher |
A launcher for a previously-ActivityResultCaller#registerForActivityResult to start the process of executing an |
ActivityResultRegistry |
A registry that stores |
IntentSenderRequest |
A request for a |
Extension functions summary
For ActivityResult | |
operator Int |
Destructuring declaration for ActivityResult to provide the requestCode |
operator Intent? |
Destructuring declaration for ActivityResult to provide the intent |
For ActivityResultLauncher | |
Unit |
ActivityResultLauncher<Void?>.launch(options: ActivityOptionsCompat? = null) Convenience method to launch a no-argument registered call without needing to pass in |
Unit |
ActivityResultLauncher<Unit>.launch(options: ActivityOptionsCompat? = null) Convenience method to launch a no-argument registered call without needing to pass in |
For ActivityResultCaller | |
ActivityResultLauncher<Unit> |
ActivityResultCaller.registerForActivityResult(contract: ActivityResultContract<I, O>, input: I, registry: ActivityResultRegistry, callback: (O) -> Unit) A version of ActivityResultCaller.registerForActivityResult that additionally takes an input right away, producing a launcher that doesn't take any additional input when called. |
ActivityResultLauncher<Unit> |
ActivityResultCaller.registerForActivityResult(contract: ActivityResultContract<I, O>, input: I, callback: (O) -> Unit) A version of ActivityResultCaller.registerForActivityResult that additionally takes an input right away, producing a launcher that doesn't take any additional input when called. |
Extension functions
component1
operator fun ActivityResult.component1(): Int
Destructuring declaration for ActivityResult to provide the requestCode
Return | |
---|---|
the resultCode of the | ActivityResult |
component2
operator fun ActivityResult.component2(): Intent?
Destructuring declaration for ActivityResult to provide the intent
Return | |
---|---|
the intent of the | ActivityResult |
launch
fun ActivityResultLauncher<Void?>.launch(options: ActivityOptionsCompat? = null): Unit
Convenience method to launch a no-argument registered call without needing to pass in null
.
launch
@JvmName("launchUnit") fun ActivityResultLauncher<Unit>.launch(options: ActivityOptionsCompat?