Playback of any song fails after swiping away the media notification
Closed this issue · 2 comments
Checklist
- I am able to reproduce the bug with the latest debug version (Android, Linux, Windows)
- I've checked that there is no open or closed issue about this bug.
- This issue contains only one bug.
- The title of this issue accurately describes the bug.
Steps to reproduce
- Open the app and start playing any song
- Close the app
- Disable "pin media player" (is called differently in different roms) to completely hide any media player session when the media isn't playing and the media player app isn't open.
- Get rid of the media player widget completely
- Open the app again
Expected behavior
Songs should play even after closing the app completely
Actual behavior
Songs do not play after closing the app completely. I need to restart the whole phone for spmp to start working again.
Screenshots / recordings
document_5918272278834976858.mp4
The first time there is sound, second time there isn't, forgot to record sound.
Logs
SpMp version
0.3.2
SpMp platform
Android
OS version
Android 11
Additional information
The recording and logs are from chinese phone called duoqin f22. The issue seems to kinda exist on my android 14 phone too but spmp recovers with simple restart of the app unlike on my f22. My uneducated guess would be that you need to check whether the session exists before trying to reuse it or just recreate it on app launch every time. I also tested whether this is purely a rom issue by playing something from cromite (privacy friendly chrome alternative) and doing the exact same steps and cromite always recovered.
The notification should be removed automatically as soon as you clear the app from recents while nothing is playing, so the bug occurs before you dismiss it manually. What's the behaviour when clearing the app without removing the notification manually?
Without clearing the notification manually it would linger indefinitely. I can't reproduce the bug anymore in the newest version so I guess whatever was changed in between 0.3.2 and 0.4.0 fixed this since nothing changed on the phone itself. Can still reproduce in the latest version after further testing, not sure why it didn't occur few first times I closed the app. After even further testing this is how it works now in 0.4.0:
- If a song is playing and I clear the app from recents the notification gets closed
- If a song is paused and I clear the app from recents the notification persists but controlling the now closed app using it respawns it and starts working (did not work like this in 0.3.2)
- the actual bug of the player not being able to recover on app restart is fixed
- the "Stop player on app close" option does not seem to make any difference in the previously mentioned behavior
The original issue is now seemingly fixed. Feel free to close this as completed or ask more info if you want to investigate the non-closing notification.