index.md 3.7 KB

//app/org.mjdev.tvapp.base.activity/ComposableActivity/ActivityResultHandler

ActivityResultHandler

inner class ActivityResultHandler<I>(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(lifecycle: Lifecycle, onLaunch: (args: List<I>) -> Unit, onActivityResult: (requestCode: Int, resultCode: Int, intent: Intent?) -> Unit)
Create ActivityResultHandler

Functions

Name Summary
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.
unregister [androidJvm]
fun unregister()
Function to register result handler. It is called automatically upon lifecycle state.

Properties

Name Summary
lifecycle [androidJvm]
val lifecycle: Lifecycle
lifecycle handler
observer [androidJvm]
val observer: LifecycleEventObserver
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