XilinJia / Podcini

Open source podcast instrument for Android in Kotlin with media3, supporting channels, playlists, podcasts and single media from YouTube and YT Music as well as normal podcasts.
GNU General Public License v3.0
158 stars 7 forks source link

Do not keep asking the user to allow notifications if they have chosen not to do so #30

Closed cosify closed 3 months ago

cosify commented 6 months ago

Checklist

App version

4.6.0

Where did you get the app from

F-Droid

Problem you may be having, or feature you want

Since one of the recent app versions, every time we launch the app, Podcini displays the pop-up message "Podcini needs your permission to show notifications. By default, Podcini only shows notifications while something is being downloaded or when something goes wrong."

If the user clicks "cancel" on this dialog box then the app force closes itself. If they click "ok" on this box then the dialog box is dismissed but nothing else happens - it does not display the android notification settings so that the user can enable notifications.

If notification permissions are not manually granted by the user, then the dialog box displays every single time the app is opened, and a toast message is also displayed with the same text when they play an episode.

The app should not keep pestering the user to enable notifications when they have chosen not to.

I have never enabled notifications for a podcast app and do not want to do so - I only use notifications for high priority tasks such as messages and email. If I want to know if my podcast app has downloaded an episode or if something has gone wrong then I will open the app and see. I can still use notification shade media controls without having notifications enabled for the app.

Suggested solution

The dialog box is asking the user to enable notifications is unintuitive. -If the user clicks "ok" then the app should should open up the notification settings so that the user can easily enable notifications. -If the user clicks "cancel" then the app should respect the user's choice, and should not keep pestering the user to enable notifications every time the app is launched.

Please follow best practice for the notification prompt, as per the Android developers guide https://developer.android.com/develop/ui/views/notifications/notification-permission#wait-to-show-prompt

Thanks for the great app.

Screenshots / Drawings / Technical details

1000000149

-

1000000152

-

Screenshot_20240407_070344_Samsung Internet

XilinJia commented 6 months ago

Thanks for the note. So the note regarding the need for notification needs to change!

Since Android 13, accessing foreground services (such as playback and feed refresh) requires notification permission. Otherwise, feeds won't refresh, at least. https://github.com/XilinJia/Podcini/issues/4#issuecomment-1975150327

You just need to grant the top level permission without checking the specifics that you don't need.

XilinJia commented 5 months ago

In 4.6.1, a new message regarding notification is shown on Android 13 and newer, in select languages (translated by Google).