volume keys do not control volume if app is not in foreground
Bug Report
Setup Description
- MPD is running in a Termux session on the phone
- MALP is directly connected to the phone via localhost:6600 (streaming not enabled)
Version of M.A.L.P.
1.2.4
Version of MPD
0.21.11
Host Operating System
N/A
Android Version
Android 9 / Pie
Device Manufacturer and model
OnePlus One
Bug Description
Description
The volume keys in Android 9 (and possible older) default to controlling the "cast" volume, rather than the media volume when MALP is not in the foreground (including on the lockscreen).
Here's an example of the volume control on the lock screen:
I suspect this has something to do with how the app's sound is registered, or possible the notification (since that is visible while the app is in the background?). I would be happy to look into the issue / create a PR if someone can point me in the right direction in the codebase.
Reproducible
Yes
Expected Behaviour
Volume keys control the media volume when MALP is in background.
Actual Behaviour
Volume keys control the "cast" volume when MALP is in background.
Log
N/A