6월 3일의 ⁠#Android11: 베타 버전 출시 행사에 참여하세요.

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

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

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.