rememberMultiplePermissionsState

Creates a MultiplePermissionsState that is remembered across compositions.

It's recommended that apps exercise the permissions workflow as described in the documentation.

Parameters

permissions

the permissions to control and observe.

onPermissionsResult

will be called with whether or not the user granted the permissions after MultiplePermissionsState.launchMultiplePermissionRequest is called.


fun rememberMultiplePermissionsState(permissions: List<String>, onPermissionsResult: (Map<String, Boolean>) -> Unit = {}, previewPermissionStatuses: Map<String, PermissionStatus> = emptyMap()): MultiplePermissionsState

Creates a MultiplePermissionsState that is remembered across compositions.

It's recommended that apps exercise the permissions workflow as described in the documentation.

Parameters

permissions

the permissions to control and observe.

onPermissionsResult

will be called with whether or not the user granted the permissions after MultiplePermissionsState.launchMultiplePermissionRequest is called.

previewPermissionStatuses

provides a PermissionStatus for a given permission when running in a preview.