as

Settings
Sign out
Notifications
Alexa
亚马逊应用商店
Ring
AWS
文档
Support
Contact Us
My Cases
新手入门
设计和开发
应用发布
参考
支持
跳转到主要内容
PermissionsKepler provides access to the Vega permissions model.

Example

Reference

Hooks

usePermissionsKepler

Returns an array containing two methods to check and request specific permissions.

Methods

check

Returns a promise that resolves to a boolean value that indicates whether the specified permissions has been granted. Parameters:

request

Requests the specified user permission. Parameters:
Remarks
The process flow depends on the current state of the permission:
  1. Permission Already Granted:
    • The function automatically resolves to granted without displaying any dialog if the requested permission has already been granted.
  2. Permission Not Granted:
    • If the permission has not been granted, a dialog box is presented to the user with Allow and Deny options.
    • User Selects Allow:
      • The function resolves to granted.
      • All future requests for this specific permission will automatically resolve to true as well, without showing the dialog again.
    • User Selects Deny:
      • The function resolves to denied.
      • The specific permission request requires that the dialog is shown again on subsequent requests.
Returns
Return Type: One of the PermissionStatus values.
PERMISSIONS
The following table lists the supported permissions.
PermissionStatus

最后修改于 2026年10月26日