ManagedActivityResultLauncher

class ManagedActivityResultLauncher<I : Any?, O : Any?> : ActivityResultLauncher


A launcher for a previously-prepared call to start the process of executing an ActivityResultContract.

This launcher does not support the unregister function. Attempting to use unregister will result in an IllegalStateException.

Parameters
<I : Any?>

type of the input required to launch

Summary

Public functions

open Unit
launch(input: I, options: ActivityOptionsCompat?)

Executes an ActivityResultContract given the required input and optional options for how the Activity should be started.

open Unit

This function is deprecated. Registration is automatically handled by rememberLauncherForActivityResult

Public properties

open ActivityResultContract<I, O>

Returns the ActivityResultContract that was used to create this launcher.

Inherited functions

From androidx.activity.result.ActivityResultLauncher
open Unit
launch(input: I)

Executes an ActivityResultContract given the required input.

Public functions

launch

Added in 1.3.0
open fun launch(input: I, options: ActivityOptionsCompat?): Unit

Executes an ActivityResultContract given the required input and optional options for how the Activity should be started.

This method throws android.content.ActivityNotFoundException if there was no Activity found to run the given Intent.

unregister

Added in 1.3.0
Deprecated in 1.3.0
open fun unregister(): Unit

This function should never be called and doing so will result in an UnsupportedOperationException.

Throws
kotlin.UnsupportedOperationException

if this function is called.

Public properties

contract

Added in 1.3.0
open val contractActivityResultContract<I, O>

Returns the ActivityResultContract that was used to create this launcher.