Closed silvaDominic closed 2 years ago
Seeing as your phone is a Samsung device, have you made sure that it's not just the system killing the app in the background?
See this for info: https://dontkillmyapp.com/samsung#android-11
@TacoTheDank Wow just tested it and this fixed the issue. I also tested with a Sony device and the issue was not present.
This is the line from the link you provided that gave it away:
"Despite Android team promise to enforce OEMs to be transparent about non-standard app killing, in Android 11 Samsung has introduced a new severe (default ON) restriction. Apps can no longer hold wake lock in foreground services. This breaks many use-cases, for instance health apps are now unable to gather sensoric data for their users."
Within the same week as the update that created bug #6989 I had installed a new major Samsung update. I suspected that could have something to do with it, but given that the only app affected was NewPipe, and that there was already another issue, I associated it with that update. I also didn't have issues with other services playing in the background like Pandora/Spotify so that led me to believe it was even less to do with the Samsung update.
Great tip and thanks! I can finally use the main feature I got NewPipe for lol.
Closing.
Issue was caused by Samsung update turning on battery optimization by default for all apps. This explains why playback would resume on wake/phone interactions.
More info here: https://dontkillmyapp.com/samsung#android-11
I have a Samsung device too (albeit running Android 10), so I know this problem a little too well.
Glad I could help! :)
Checklist
Affected version
~21.14+
Steps to reproduce the bug
Expected behavior
A video should play in the background, possibly buffer, and return to play once buffered without any human interaction.
Actual behavior
Video freezes and does not return playing unless intervening.
Screenshots/Screen recordings
https://user-images.githubusercontent.com/12387334/158082304-f23e5d1a-7ad5-4c18-b5ab-9d58bff4797b.mp4
Logs
This is not the error log for the above videoUsually this does not produce an error. However, while listening to a fireplace video last night, it did. Unfortunately, I accidentally saved the non-formatted version. Sorry :/
I was able to produce an error on same video stream as above.
Exception
Crash log
Affected Android/Custom ROM version
Android 11
Affected device model
Samsung 10e
Additional information
This started occurring during the same time issue 8029 started happening. I know this because there are 2 routines where I use the background player for extended periods of time:
After the update, I was unable to use the background player for extended periods of time and had to just play it via the video player. Typically what happens is after 2-5 minutes the audio playback will freeze. I will interact with the phone which will immediately resume playback and then playback will continue to freeze every 30-60s.
What is particularly weird is that it does not appear to be a buffering issue. As you can see in the video, playback returns after the phone is unlocked. I was not able to capture it, but it also often returns when simply using the volume up/down keys without unlocking the phone. Mind you, that my internet speed is 300Mb/s in the above video. For the videos I watched on the train prior to the issue, my connection was significantly slower than this, relying only on data and I still never had this issue.