Permissions Module
Module that exposes the Android M Permission system to JS.
Functions
Return true if you intend to override some other native module that was registered e.g. as part of a different package (such as the core one). Trying to override without returning true from this method is considered an error and will throw an exception during initialization. By default all modules return false.
Check if the app has the permission given. successCallback is called with true if the permission had been granted, false otherwise. See Activity.checkSelfPermission.
This method is called after ReactApplicationContext has been created.
Allow NativeModule to clean up. Called before React Native instance is destroyed.
Allow NativeModule to clean up. Called before {CatalystInstance#onHostDestroy}
Request the given permission. successCallback is called with GRANTED if the permission had been granted, DENIED or NEVER_ASK_AGAIN otherwise. For devices before Android M, this checks if the user has the permission given or not and resolves with GRANTED or DENIED. See Activity.checkSelfPermission.
Check whether the app should display a message explaining why a certain permission is needed. successCallback is called with true if the app should display a message, false otherwise. This message is only displayed if the user has revoked this permission once before, and if the permission dialog will be shown to the user (the user can choose to not be shown that dialog again). For devices before Android M, this always returns false. See permissionAwareActivity.shouldShowRequestPermissionRationale.