PermissionsAndroid provides access to Android M's new permissions model.
Some permissions are granted by default when the application is installed
so long as they appear in
AndroidManifest.xml. However, "dangerous"
permissions require a dialog prompt. You should use this module for those
On devices before SDK version 23, the permissions are automatically granted
if they appear in the manifest, so
should always be true.
If a user has previously turned off a permission that you prompt for, the OS
will advise your app to show a rationale for needing the permission. The
rationale argument will show a dialog prompt only if
necessary - otherwise the normal permission prompt will appear.
Returns a promise resolving to a boolean value as to whether the specified permissions has been granted
Prompts the user to enable a permission and returns a promise resolving to a boolean value indicating whether the user allowed or denied the request
If the optional rationale argument is included (which is an object with a
message), this function checks with the OS whether it is
necessary to show a dialog explaining why the permission is needed
and then shows the system permission dialog
Вы можете отредактировать перевод на GitHub и создать pull request!