(listOfPermissions: string[]): Promise
Description: This method is used to ask for permissions for
- Accessing User Location
- Reading SMS (Android only)
Parameter Name | Type | Description |
---|---|---|
listOfPermissions | Array<string> | List of the permissions that you would like to ask for. The permissions you can ask for are described in the table below. |
ResponsePromise resolve: [ { "permission":"LOCATION", "permissionGranted":true, "willShowPermissionAlertAgain": false }, { "permission":"READ_SMS", "permissionGranted": true, "willShowPermissionAlertAgain": false } ]
Promise<any>
Permission Name | Description |
---|---|
READ_SMS (accessed asPhonePe.Constants.Permission. READ_SMS) | Read the user SMS for functionalities like OTP detection. Only available for Android. |
LOCATION (accessed asPhonePe.Constants.Permission.LOCATION) | Retrieve the user’s location. |
CAMERA (accessed asPhonePe.Constants.Permission.CAMERA) | Asks for camera permission |
Usage:
JavaScriptlet result = await sdk.seekPermission([PhonePe.Constants.Permission.READ_SMS, PhonePe.Constants.Permission.LOCATION,PhonePe.Constants.Permission.CAMERA])