rememberMultiplePermissionState

Creates a MultiplePermissionState for a multiple permissions that is remembered across compositions.

Example:

@Composable
fun PermissionDemo() {
val state by rememberMultiplePermissionState(
Manifest.permission.CAMERA
Manifest.permission.ACCESS_FINE_LOCATION,
Manifest.permission.READ_CONTACTS
)

if (state.allGranted) {
// Render something
}

val grantedPermissions = state.grantedPermissions
// Do something with `grantedPermissions`

val deniedPermissions = state.deniedPermissions
// Do something with `deniedPermissions`
}

Parameters

permissions

The list of permissions to observe.

Throws