Open avently opened 4 years ago
As someone who had issues with Android app killing problem, this could be both programming and phone settings issue. I had to solve similar issue on Huawei and Xiaomi phones, I solved it by both code change and phone battery settings. Without phone battery settings your code won't be able to do anything to prevent system from killing the app. So I would suggest trying this by setting no restrictions for skytube app and let it work on background. Any setting that does this should be applied.
Ya I think okan35 is correct. In you phone settings search for "battery optimization" or something similar. Make sure that the app is set to "not optimized".
If that fixes the issue, then SkyTube could add a feature similar to the Microsoft authenticator app. To enable features in that app, it will ask that the user disable battery optimization, and then send the user to the system settings to turn it off for the app.
Can confirm I have this issue when I turn the screen off with SkyTube in the foreground. A little prompt about battery optimisation would be nice. I haven't yet tried disabling battery optimisation but I will report back with results.
Android kills the app after some time of background playback. It happens after ~10 minutes if screen is off or app is hidden. This way you get stopped playback, the playback can be started from the start of a video (current position is lost), controls in appbar menu have duplicates (reload button and others).
How to reproduce: Play any long video Hide the app in the playing state Wait some time before a stop of audio.