Missed the live Ionic Event? Check out all the product announcements, new releases, and more.

DocsPluginsCLI
pwaiosandroid

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>
Param Type
options PermissionsOptions

Returns: Promise<PermissionResult>


Interfaces

PermissionResult

Prop Type
state "denied" | "granted" | "prompt"

PermissionsOptions

Prop Type
name PermissionType

Enums

PermissionType

Members Value
Camera "camera"
Photos "photos"
Geolocation "geolocation"
Notifications "notifications"
ClipboardRead "clipboard-read"
ClipboardWrite "clipboard-write"
Microphone "microphone"
Previous
<- Network
Next
Push Notifications ->
Contribute ->