useRequestPermissions
The useRequestPermissions hook provides a function to request native device permissions from the user. It handles both app-level and system-level permission requests, showing appropriate dialogs and managing permission state. Supported permissions include camera, microphone, and device motion access.
Note
Before using this hook, add the required permissions to your Mini's manifest file: "permissions": ["CAMERA"].
Note:
Before using this hook, add the required permissions to your Mini's manifest file: "permissions": ["CAMERA"].
Anchor to useRequestPermissionsuse Request Permissions()
use Request Permissions()
UseRequestPermissionsReturnsUseRequestPermissionsReturns
UseRequestPermissionsReturns
- requestPermission
Request native permissions from the user
(params: RequestPermissionParams) => Promise<RequestPermissionResponse>
RequestPermissionParams
- permission
MiniPermission
MiniPermission
'CAMERA' | 'MICROPHONE' | 'MOTION'RequestPermissionResponse
- errorMessage
string - granted
boolean
Was this page helpful?