-
-
Notifications
You must be signed in to change notification settings - Fork 61
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Notification runtime permission #315
Notification runtime permission #315
Conversation
…op-android into notification-runtime-permission
@fm-sys I've done basic permission handling and skipped redirecting the user to the app settings after permission has been denied twice(as the user may find it annoying to see a snackbar every time they open the app). Please take a look and let me know if any changes/improvements are to be made. |
Hm, I somehow don't really like it if apps randomly ask for a permission. Two options come to my mind (the second would be the way to go IMHO):
Or another variant (similar to no. 2):
What do you think? |
I think this is the appropriate way. I have a few questions: "Show the alert dialog only if permission gets denied" - do you want the alert dialog to be shown when shouldShowRequestPermissionRationale() returns true or as soon as the user denies the permission for the first time? "As soon as the first download is complete" - after the first file transfer is complete or after the first file is downloaded? |
Both options would make sense and are probably pretty equivalent. Or did I missed something?
As soon as we try to show the first notification, I guess.
OTOH really popular apps like WhatsApp or Signal messager also show the Explanation Dialog before requesting the permission for the first time. IMHO there are good reasons for it... |
If we implement permission handling as suggested in the official Android documentation,
A notification is created for every successfully downloaded file. If we should show the dialog as soon as we try to show the first notification, we'd have to put it in a method that is called when the file-received event is fired, which would spawn multiple alert dialogs.
Sounds reasonable. |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Help me to use
Fixes #251
Tested on Realme Narzo 30 5G running Android 13