RequestMultiplePermissions

class RequestMultiplePermissions : ActivityResultContract<Array<String!>!, MutableMap<String!, Boolean!>!>
kotlin.Any
   ↳ androidx.activity.result.contract.ActivityResultContract<kotlin.Array<kotlin.String>, kotlin.collections.MutableMap<kotlin.String, kotlin.Boolean>>
   ↳ androidx.activity.result.contract.ActivityResultContracts.RequestMultiplePermissions

An ActivityResultContract to request permissions

Summary

Constants
static String

An Intent action for making a permission request via a regular Activity#startActivityForResult API.

static String

Key for the extra containing all the requested permissions.

static String

Key for the extra containing whether permissions were granted.

Public constructors

An ActivityResultContract to request permissions

Public methods
Intent
createIntent(@NonNull context: Context, @NonNull input: Array<String!>)

ActivityResultContract.SynchronousResult<MutableMap<String!, Boolean!>!>?
getSynchronousResult(@NonNull context: Context, @Nullable input: Array<String!>?)

MutableMap<String!, Boolean!>
parseResult(resultCode: Int, @Nullable intent: Intent?)

Constants

ACTION_REQUEST_PERMISSIONS

static val ACTION_REQUEST_PERMISSIONS: String

An Intent action for making a permission request via a regular Activity#startActivityForResult API. Caller must provide a String[] extra EXTRA_PERMISSIONS Result will be delivered via Activity#onActivityResult(int, int, Intent) with String[] EXTRA_PERMISSIONS and int[] EXTRA_PERMISSION_GRANT_RESULTS, similar to Activity#onRequestPermissionsResult(int, String[], int[])

Value: "androidx.activity.result.contract.action.REQUEST_PERMISSIONS"

EXTRA_PERMISSIONS

static val EXTRA_PERMISSIONS: String

Key for the extra containing all the requested permissions.

Value: "androidx.activity.result.contract.extra.PERMISSIONS"

EXTRA_PERMISSION_GRANT_RESULTS

static val EXTRA_PERMISSION_GRANT_RESULTS: String

Key for the extra containing whether permissions were granted.

Value: "androidx.activity.result.contract.extra.PERMISSION_GRANT_RESULTS"

Public constructors

<init>

RequestMultiplePermissions()

An ActivityResultContract to request permissions

Public methods

createIntent

@NonNull fun createIntent(
    @NonNull context: Context,
    @NonNull input: Array<String!>
): Intent

getSynchronousResult

@Nullable fun getSynchronousResult(
    @NonNull context: Context,
    @Nullable input: Array<String!>?
): ActivityResultContract.SynchronousResult<MutableMap<String!, Boolean!>!>?

parseResult

@NonNull fun parseResult(
    resultCode: Int,
    @Nullable intent: Intent?
): MutableMap<String!, Boolean!>