diff --git a/README.md b/README.md index 06521f9..1b0ac99 100644 --- a/README.md +++ b/README.md @@ -128,6 +128,12 @@ these permissions from the user and they must be changed in app settings. You ca method `EasyPermissions.somePermissionPermanentlyDenied(...)` to display a dialog to the user in this situation and direct them to the system setting screen for your app: +**Note**: Due to a limitation in the information provided by the Android +framework permissions API, the `somePermissionPermanentlyDenied` method only +works after the permission has been denied and your app has received +the `onPermissionsDenied` callback. Otherwise the library cannot distinguish +permanent denial from the "not yet denied" case. + ```java @Override public void onPermissionsDenied(int requestCode, List perms) { diff --git a/easypermissions/src/main/java/pub/devrel/easypermissions/EasyPermissions.java b/easypermissions/src/main/java/pub/devrel/easypermissions/EasyPermissions.java index bc54efc..b9885ab 100644 --- a/easypermissions/src/main/java/pub/devrel/easypermissions/EasyPermissions.java +++ b/easypermissions/src/main/java/pub/devrel/easypermissions/EasyPermissions.java @@ -291,6 +291,12 @@ public static void onRequestPermissionsResult(int requestCode, * Check if at least one permission in the list of denied permissions has been permanently * denied (user clicked "Never ask again"). * + * Note: Due to a limitation in the information provided by the Android + * framework permissions API, this method only works after the permission + * has been denied and your app has received the onPermissionsDenied callback. + * Otherwise the library cannot distinguish permanent denial from the + * "not yet denied" case. + * * @param host context requesting permissions. * @param deniedPermissions list of denied permissions, usually from {@link * PermissionCallbacks#onPermissionsDenied(int, List)}