Skip to content
This repository was archived by the owner on Oct 3, 2024. It is now read-only.

Commit 354d986

Browse files
authored
Add clarification (based on #212) (#219)
2 parents 2dc90e6 + 962ec99 commit 354d986

File tree

2 files changed

+12
-0
lines changed

2 files changed

+12
-0
lines changed

README.md

Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -128,6 +128,12 @@ these permissions from the user and they must be changed in app settings. You ca
128128
method `EasyPermissions.somePermissionPermanentlyDenied(...)` to display a dialog to the
129129
user in this situation and direct them to the system setting screen for your app:
130130

131+
**Note**: Due to a limitation in the information provided by the Android
132+
framework permissions API, the `somePermissionPermanentlyDenied` method only
133+
works after the permission has been denied and your app has received
134+
the `onPermissionsDenied` callback. Otherwise the library cannot distinguish
135+
permanent denial from the "not yet denied" case.
136+
131137
```java
132138
@Override
133139
public void onPermissionsDenied(int requestCode, List<String> perms) {

easypermissions/src/main/java/pub/devrel/easypermissions/EasyPermissions.java

Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -291,6 +291,12 @@ public static void onRequestPermissionsResult(int requestCode,
291291
* Check if at least one permission in the list of denied permissions has been permanently
292292
* denied (user clicked "Never ask again").
293293
*
294+
* <b>Note</b>: Due to a limitation in the information provided by the Android
295+
* framework permissions API, this method only works after the permission
296+
* has been denied and your app has received the onPermissionsDenied callback.
297+
* Otherwise the library cannot distinguish permanent denial from the
298+
* "not yet denied" case.
299+
*
294300
* @param host context requesting permissions.
295301
* @param deniedPermissions list of denied permissions, usually from {@link
296302
* PermissionCallbacks#onPermissionsDenied(int, List)}

0 commit comments

Comments
 (0)