FossifyOrg / Music-Player

A clean music player with a customizable widget, stylish interface and no ads.
https://www.fossify.org
GNU General Public License v3.0
201 stars 24 forks source link

Cannot play music without granting notification permission #56

Open austinoneil opened 2 weeks ago

austinoneil commented 2 weeks ago

Checklist

Affected app version

1.0.0

Affected Android/Custom ROM version

GrapheneOS latest

Affected device model

Pixel 7

How did you install the app?

F-Droid / IzzyOnDroid

Steps to reproduce the bug

  1. Open the app
  2. Deny the app notification permissions
  3. Attempt to play a track

Expected behavior

App plays track

Actual behavior

A modal pops up saying "You must allow the app displaying notifications, else it cannot play songs"

Screenshots/Screen recordings

No response

Additional information

No response

austinoneil commented 2 weeks ago

I deleted the check on my local machine and kept the permission denied, and it was working. If this was because of the media session that shows up in the notification bar, media sessions are exempt from the notification permission.

naveensingh commented 2 weeks ago

The notification permission isn't just there for the media session. It's used to send notifications like "Storage permission is required" when playback is triggered from the background and there is no storage permission or an error message when the service fails. The media scanner will probably be moved to a foreground service in the future and that will require the notification permission too.

austinoneil commented 2 weeks ago

Gotcha. Do you think it would make sense to use a different method of notifying users when they have notifications denied? (snackbar item, toast, etc.) As is, you cannot play music without granting notification permission.