This function checks if one of the dangerous permissions is granted at beginning or not. For permissions in same category with one of the permissions is approved earlier, checking will return as it is not required to request for the same category permission.
checkPermission
1.2
With requestPermissions, the System Dialog will appear to ask for permission grant by user for dangerous(privacy) permissions. Application.android#onRequestPermissionsResult onRequestPermissionsResult will be fired after user interact with permission dialog.
import Application from '@smartface/native/application';
const PERMISSION_CODE = 1002;
Application.android.requestPermissions(PERMISSION_CODE, Application.Android.Permissions.WRITE_EXTERNAL_STORAGE)
Application.android.onRequestPermissionsResult = (e) => {
console.log(JSON.stringify(e));
}
requestPermissions
1.2
Optional
requestIdentifier: numberOptional. If not provided, it will be given automatically.
This event is called after Application.requestPermissions function. This event is fired in asynchronous way.
1.2
1.2
Generated using TypeDoc
This method checks for a permission is shown before to user and the program is about to request the same permission again.
Method
shouldShowRequestPermissionRationale
Returns
Android
Since
1.2