O Google tem o compromisso de promover a igualdade racial para as comunidades negras. Saiba como.

ActivityResultLauncher

public abstract class ActivityResultLauncher
extends Object

java.lang.Object
   ↳ androidx.activity.result.ActivityResultLauncher<I>


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

Summary

Public constructors

ActivityResultLauncher()

Public methods

abstract ActivityResultContract<I, ?> getContract()

Get the ActivityResultContract that was used to create this launcher.

void launch(I input)

Executes an ActivityResultContract.

abstract void launch(I input, ActivityOptionsCompat options)

Executes an ActivityResultContract.

abstract void unregister()

Unregisters this launcher, releasing the underlying result callback, and any references captured within it.

Inherited methods

Public constructors

ActivityResultLauncher

public ActivityResultLauncher ()

Public methods

getContract

public abstract ActivityResultContract<I, ?> getContract ()

Get the ActivityResultContract that was used to create this launcher.

Returns
ActivityResultContract<I, ?> the contract that was used to create this launcher

launch

public void launch (I input)

Executes an ActivityResultContract.

Parameters
input I: the input required to execute an ActivityResultContract.

launch

public abstract void launch (I input, 
                ActivityOptionsCompat options)

Executes an ActivityResultContract.

Parameters
input I: the input required to execute an ActivityResultContract.

options ActivityOptionsCompat: Additional options for how the Activity should be started.

unregister

public abstract void unregister ()

Unregisters this launcher, releasing the underlying result callback, and any references captured within it. You should call this if the registry may live longer than the callback registered for this launcher.