PermissionState

@Stable()
interface PermissionState

A state object that can be hoisted to control and observe permission status changes.

In most cases, this will be created via rememberPermissionState.

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

Functions

launchPermissionRequest
Link copied to clipboard
abstract fun launchPermissionRequest()
Request the permission to the user.

Properties

hasPermission
Link copied to clipboard
abstract val hasPermission: Boolean
When true, the user has granted the permission.
permission
Link copied to clipboard
abstract val permission: String
The permission to control and observe.
permissionRequested
Link copied to clipboard
abstract val permissionRequested: Boolean
When true, the permission request has been done previously.
shouldShowRationale
Link copied to clipboard
abstract val shouldShowRationale: Boolean
When true, the user should be presented with a rationale.