Google은 흑인 공동체를 위한 인종 간 평등을 진전시키기 위해 노력하고 있습니다. Google에서 어떤 노력을 하고 있는지 확인하세요.

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.