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`
}
Content copied to clipboard
Parameters
permissions
The list of permissions to observe.
Throws
If PermissionFlow is not initialized