//tvlib/org.mjdev.tvlib.activity/ActivityResultHandler
ActivityResultHandler
class ActivityResultHandler<I>(activity: ComposableActivity, val lifecycle: Lifecycle, val onLaunch: (args: List<I>) -> Unit, val onActivityResult: (requestCode: Int, resultCode: Int, intent: Intent?) -> Unit)
Activity result handler.
Parameters
androidJvm
| I |
Constructors
| ActivityResultHandler | [androidJvm] constructor(activity: ComposableActivity, lifecycle: Lifecycle, onLaunch: (args: List<I>) -> Unit, onActivityResult: (requestCode: Int, resultCode: Int, intent: Intent?) -> Unit) Create ActivityResultHandler |
Properties
| Name | Summary |
|---|---|
| lifecycle | [androidJvm] val lifecycle: Lifecycle lifecycle handler |
| onActivityResult | [androidJvm] val onActivityResult: (requestCode: Int, resultCode: Int, intent: Intent?) -> Unit result handler |
| onLaunch | [androidJvm] val onLaunch: (args: List<I>) -> Unit function to start activity |
Functions
| Name | Summary |
|---|---|
| equals | [androidJvm] open operator fun equals(other: Any?): Boolean |
| hashCode | [androidJvm] open fun hashCode(): Int |
| launch | [androidJvm] fun launch(vararg args: I) Launch the onLaunch handler. |
| postResult | [androidJvm] fun postResult(requestCode: Int, resultCode: Int, intent: Intent?) Post result to handler. |
| toString | [androidJvm] open fun toString(): String |
| unregister | [androidJvm] fun unregister() Function to register result handler. It is called automatically upon lifecycle state. |