ActivityResultContracts.RequestMultiplePermissions

public final class ActivityResultContracts.RequestMultiplePermissions extends ActivityResultContract


An ActivityResultContract to request permissions

Summary

Public constructors

Public methods

@NonNull Intent

Create an intent that can be used for android.app.Activity.startActivityForResult.

@Nullable ActivityResultContract.SynchronousResult<@NonNull Map<@NonNull String, @NonNull Boolean>>
getSynchronousResult(
    @NonNull Context context,
    @NonNull Array<@NonNull String> input
)

An optional method you can implement that can be used to potentially provide a result in lieu of starting an activity.

@NonNull Map<@NonNull String, @NonNull Boolean>
parseResult(int resultCode, @Nullable Intent intent)

Convert result obtained from android.app.Activity.onActivityResult to O.

Public constructors

RequestMultiplePermissions

public final RequestMultiplePermissions()

Public methods

createIntent

@NonNull
public Intent createIntent(@NonNull Context context, @NonNull Array<@NonNull String> input)

Create an intent that can be used for android.app.Activity.startActivityForResult.

getSynchronousResult

@Nullable
public ActivityResultContract.SynchronousResult<@NonNull Map<@NonNull String, @NonNull Boolean>> getSynchronousResult(
    @NonNull Context context,
    @NonNull Array<@NonNull String> input
)

An optional method you can implement that can be used to potentially provide a result in lieu of starting an activity.

Returns
ActivityResultContract.SynchronousResult<@NonNull Map<@NonNull String, @NonNull Boolean>>

the result wrapped in a SynchronousResult or null if the call should proceed to start an activity.

parseResult

@NonNull
public Map<@NonNull String, @NonNull BooleanparseResult(int resultCode, @Nullable Intent intent)

Convert result obtained from android.app.Activity.onActivityResult to O.