Music-Player-GO
Music-Player-GO copied to clipboard
[BUG] For songs without a cover: no navigational buttons drawn except play/pause
-
Describe the bug When I start playback of music, there are no buttons drawn for pausing, fowarding, playing etc. both on the lock screen and in the notification centre. Note that a touch to the area does produce the intended action though.
-
To Reproduce the behaviour
- Play any music track.
- Pull down to see notification centre or lock phone to see lock screen.
- See error!
-
Expected behavior The navigation buttons should be displayed.
-
Smartphone
- Device: Pixel 4a
- OS: Android 12
- ROM or mods: GrapheneOS Build SQ1.220105.002.2022013120
- MusicPlayerGo version: 4.412
- Screenshots
Additional context
- The error persists across phone restarts and across GrapheneOS updates.
- I think it started with the MusicPlayerGo version that introduced the new dark theme which led to #350 but I am not certain.
- I am using MusicPlayerGo in a user profile, which hasn't led to any problems so far.
Hi, thanks for letting me know.
Could you try disabling album covers option and see what happens?
What happens if you click where the actions should appear?
Damnit, knew I would forget something! :)
What happens if you click where the actions should appear?
A touch to the area where the button would be does produce the correct action, the buttons are just not drawn. This issue seems to happen with several music players and the GrapheneOS team seems convinced that it's not caused by GrapheneOS or even AOSP, but I'm not sure (see https://github.com/GrapheneOS/os-issue-tracker/issues/754).
Could you try disabling album covers option and see what happens?
I am not sure what you mean here. I disabled "Settings->General->Embedded album covers". I am not sure whether this should change displaying the cover in the screenshots above? If so, it doesn't, everything stays the same.
(In the meantime, there was an update for GrapheneOS, but the error persists. I amended my first post accordingly.)
So actions are invisible even with embedded covers are disabled?
Yeah, weird issue. Everything works good on aosp emulator.
Gonna investigate the issue. Will post test apk in the future.
Sadly I don't have a device running android 12 and can't reproduce this issue, so I need You to test changes π
So actions are invisible even with embedded covers are disabled?
Yes. ~~Additionally, the cover is still visible, not sure whether this is intended.~~ Edit: The cover does disappear if embedded cover is disabled, I tested this wrongly.
Sadly I don't have a device running android 12 and can't reproduce this issue, so I need You to test changes π
Sure thing, I'm happy to help! Thanks for your work! :)
Thank you!
Notifications not updating is another bug. Shame on emulatorsπ
Could you test builds from here?
https://github.com/enricocid/Music-Player-GO/releases
4.4.12 and 4.4.11
Be sure to disable battery optimization π Thanks.ππ»
I tested both with disabled battery optimization. The bug persists.
Hi, could you check if this player works?
Thanks
https://github.com/OxygenCobalt/Auxio
@OxygenCobalt
I checked Auxio in a new user profile with disabled battery optimization and with disabled embedded covers: it doesn't work, the buttons are not drawn.
Seems like a system-specific issue. I've had situations where SystemUI permanently mangles some element for no reason and the only way to fix it is to factory reset the OS.
Yep, that's a weird bug.
Can't find the issue with my code ... I'm copying & pasting the code for notifications directly from Google guidelines.
I've noticed, for example, that switching profiles on Android 10/lineageos causes system UI to draw status bar over the toolbars and other UI issues...
https://github.com/GrapheneOS/os-issue-tracker/issues/933#issuecomment-1030706962
I tend to agree.
(I fairly recently did a factory reset (for other reasons, the bug issued here happened at some point after the reset). I didn't manipulate any permissions or sys settings though that were temporally close to the emergence of this bug so I have no clue.)
I won't factory reset in the near future. When I do, I will observe how MusicPlayerGo (and Auxio) behave and will report.
Feel free to close this issue in the meantime or let me know if there is anything else I can test. :) Thanks for your time and work! :)
Interesting development:
My OS (GrapheneOS) has been on Android 13 for a while now (but not when this issue started).
I just updated Music Player GO to 4.4.22 which implements support for Android 13.
Now, the navigation buttons are drawn everywhere, BUT if a song does not have a cover, only the play/paus button is drawn.
Note that I did not factory reset my phone in the meantime.
Does this crack the riddle?
Can you show a screenshot @flippflapp?
@OxygenCobalt sure thing, here you go:
Ah, that's not an issue with the system UI, MPGO is simply uploading a default cover that makes the color calculation not work properly, obscuring the UI in the process.
@enricocid You may want to stop providing your default cover icon to the notification and simply pass null
to METADATA_KEY_ALBUM_ART
/setLargeIcon
. That's what I do and the placeholders provided by the system tend to work quite well.
Otherwise, I think we can close this issue since it's resolved on GrapheneOS's end.
Let me know if you want me to test a test-apk.
@OxygenCobalt Already doing π
https://github.com/enricocid/Music-Player-GO/blob/0a40c107865e1b3f65cfa2f12c893e158bd6c4bd/project/app/src/main/java/com/iven/musicplayergo/extensions/MusicExts.kt#L97
No idea whether this is related, see #477 which I just filed.
Yes, there's something wrong in that extension π I'll post an apk later (sorry, but I still don't have A13 running on my device, only emulator)
No worries at all, don't stress! Thanks so much for your work! :) Just ping me when you have an apk and I'll test it (probably tomorrow).
Sorry if I was unclear, but the test-apk over here did not this this issue :(
Could you post me some screenshots?
- Cover option disabled
- Cover option enabled (but no cover available)
- Cover option enabled (cover available)
Thanks :)
setColor and setColorized set to true is probably causing the issue @OxygenCobalt
null
is already passed on error and when cover option is disabled
@flippflapp Test apk: https://drive.google.com/file/d/1bLgg6SJog2yNMvyIRllcgbu3WI3bGqT4/view?usp=sharing
@enricocid the bug persists:
-
Cover option disabled (cover available):
-
Cover option enabled (but no cover available)
-
Cover option enabled (cover available)
@enricocid Yeah, colorization isn't really meant to be used for media notifications.
To be honest, I cannot put into words how terrible the media session/notification API is. They really need to throw the whole thing out and start again.
@flippflapp
https://github.com/enricocid/Music-Player-GO/actions/runs/3244035001
You can try the apk that will be posted here once built :) Code is now similar to auxio
The extension to load covers should be ok, I think https://github.com/enricocid/Music-Player-GO/blob/19b4627ea960afcbba8487b0e489b145c669e786/project/app/src/main/java/com/iven/musicplayergo/extensions/MusicExts.kt#L97
I'm confused @OxygenCobalt
:)
That is basically the bitmap loading routine I use @enricocid. Looks fine. I was just annoyed the MediaSession API in general, not your code.
I'd wipe the entire Android ecosystem with a flamethrower xd