PermissionsRequired

@Composable()
fun PermissionsRequired(multiplePermissionsState: MultiplePermissionsState, permissionsNotGrantedContent: @Composable() () -> Unit, permissionsNotAvailableContent: @Composable() () -> Unit, content: @Composable() () -> Unit)

Composable that exercises the permissions flows as described in the documentation when multiple permissions are required to be granted for content.

If any permission is not granted and a rationale should be shown, or the user hasn't been presented with the permissions yet, permissionsNotGrantedContent will be added to Composition. If the user doesn't want to be asked for permissions again, permissionsNotAvailableContent will be added instead.

Parameters

multiplePermissionsState

required permissions to be granted.

permissionsNotGrantedContent

content to show when the user hasn't granted all permissions. Requesting the permissions to the user is allowed using MultiplePermissionsState.launchMultiplePermissionRequest in a side-effect or non-Composable lambda.

permissionsNotAvailableContent

content to show when the permissions are not available. This could be because the user doesn't want to be asked again for these permissions or the permissions are blocked in the device. Attempting to request the permission to the user in this part of Composition has no effect.

content

content to show when all permissions are granted.