Impl

abstract class Impl<I, O>(val resultRegistry: ActivityResultRegistry, val resultContract: ActivityResultContract<I, O>) : ActivityCallContractHandler<I, O>

Base implementation that registers resultContract during onCreate.

This lets subclasses provide only the registry key/callback behavior they need instead of repeating launcher registration code.

Constructors

Link copied to clipboard
constructor(resultRegistry: ActivityResultRegistry, resultContract: ActivityResultContract<I, O>)
constructor(activity: ComponentActivity, activityResultContract: ActivityResultContract<I, O>)

Enable construction from activity

Properties

Link copied to clipboard
open override val registryKey: String

Key by which resultCallback will be identified within resultRegistry

Link copied to clipboard
abstract val resultCallback: (O) -> Unit

Callback invoked with the contract output.

Link copied to clipboard

Contract that converts inputs and outputs for the activity call.

Link copied to clipboard
open lateinit override var resultLauncher: ActivityResultLauncher<I>

Launcher created during lifecycle registration.

Link copied to clipboard

Registry used to create the launcher.

Functions

Link copied to clipboard
open override fun onCreate(owner: LifecycleOwner)
Link copied to clipboard
open fun onDestroy(owner: LifecycleOwner)
Link copied to clipboard
open fun onPause(owner: LifecycleOwner)
Link copied to clipboard
open fun onResume(owner: LifecycleOwner)
Link copied to clipboard
open fun onStart(owner: LifecycleOwner)
Link copied to clipboard
open fun onStop(owner: LifecycleOwner)