Skip to main content
Version: v2

Permissions

The Permissions API provides methods to check if certain permissions have been granted before requesting them.

This can be useful, for example, to avoid a user denying a permission request due to lack of context behind why the app is requesting the permission. Instead, checking the permission first and optionally displaying a custom UI to prepare the user for the permission check could increase permission allow rates and improve user experience.

API

query(...)

query(options: PermissionsOptions) => Promise<PermissionResult>
ParamType
options
PermissionsOptions

Returns:

Promise<PermissionResult>


Interfaces

PermissionResult

PropType
state"denied" | "granted" | "prompt"

PermissionsOptions

PropType
name
PermissionType

Enums

PermissionType

MembersValue
Camera"camera"
Photos"photos"
Geolocation"geolocation"
Notifications"notifications"
ClipboardRead"clipboard-read"
ClipboardWrite"clipboard-write"
Microphone"microphone"