googlesamples / easypermissions

Simplify Android M system permissions
https://firebaseopensource.com/projects/googlesamples/easypermissions/
Apache License 2.0
9.87k stars 1.46k forks source link

[Request] AppSettingsDialog callbacks #244

Closed heath3n closed 6 years ago

heath3n commented 6 years ago

Basic Information

Device type: Samsung Galaxy S8 OS version: Oreo 8.0 EasyPermissions version: 1.3.0

Describe the problem

It would be nice to have callbacks for the AppSettingsDialog actions similar to the ones that are already in place for the rationale dialog.

Use case: One of my tabs requires a permission before it can load any content. In the event that the user permanently denies the permission, a "click to fix" Snackbar is displayed that re-checks permissions. If the user cancels out of the resulting AppSettingsDialog, however, the Snackbar has been dismissed and the user now has no way of triggering the permission check. With the callback, I could re-display the Snackbar.

SUPERCILEX commented 6 years ago

You can simply check to see if you have the permissions in onActivityResult

samtstern commented 6 years ago

@SUPERCILEX 's suggestion is correct, so going to close this issue. Hope that makes sense @heath3n