Launcher

Creates a ComposableNavSpec.Launcher that takes the SingleValueNavigationAction.value as the input of its ActivityResultContract.

Parameters

ViewModel

the type of BaseLifecycleViewModel that any onResult should be applied to.

Input

the type of input the activityResultContract expects.

Output

the type of output the activityResultContract produces.

activityResultContract

The ActivityResultContract to launch.

onResult

The result received after the launched screen has completed.


Creates a ComposableNavSpec.Launcher to launch an Activity with the NavigationAction.bundle.

Parameters

Activity

The type of android.app.Activity to launch.

ViewModel

the type of BaseLifecycleViewModel that any onResult should be applied to.

Output

the type of output the activityResultContract produces.

activityResultContract

The ActivityResultContract to launch. Must have Intent as its input type.

flags

A set of IntentFlag to be applied to the launched activity.

onResult

The result received after the launched screen has completed.