public static interface PermissMe.PermissionListener
Modifier and Type | Method and Description |
---|---|
void |
onOptionalPermissionDenied(String[] deniedPermissions,
boolean[] isAutoDenied)
The callback when optional permissions were ungranted.
|
void |
onRequiredPermissionDenied(String[] deniedPermissions,
boolean[] isAutoDenied)
The callback when required permissions were ungranted
|
void |
onSuccess()
The callback when required permissions were granted by the user (does not guarantee optional permissions
were granted.
|
void onSuccess()
void onRequiredPermissionDenied(String[] deniedPermissions, boolean[] isAutoDenied)
deniedPermissions
- the denied required permissions that were queried forisAutoDenied
- an array of booleans indicating whether the deniedPermissions were auto-denied,
ergo, the user previously or currently checked "Never ask again" on the permission dialog.
Each boolean is associated with a permission in the deniedPermissions list
A Snackbar
is shown by default telling the user to turn the
permission on with an action button that will take them to the app's settings. Caller can specify
turning the snackbar off using PermissMe.Builder.showNoUIOnFailure()
to handle this by themselves.void onOptionalPermissionDenied(String[] deniedPermissions, boolean[] isAutoDenied)
onSuccess()
will still
be called because the permissions were optional. This method is provided if you want to do logging or
perform any special operations when optional permissions were denied. Denying optional permissions should
still allow the operation the user was trying to execute to continue.deniedPermissions
- the denied optional permissions that were queried forisAutoDenied
- an array of booleans indicating whether the deniedPermissions were auto-denied,
ergo, the user previously or currently checked "Never ask again" on the permission dialog.
Each boolean is associated with a permission in the deniedPermissions list