Thanks for your observations Anke. Yes, that is an issue but not the only solution.
A Stay Awake routine can also prevent the screen from closing.
Either
- use a Stay Awake block routine using a Notifier
- or you use Taifun’s Tools Extension: https://puravidaapps.com/tools.php
Be aware using either an extension or a block routine drains your device battery rapidly . These work around methods are not running the app in the Background, they force the app screen to stay open.
- A user can also use his/her finger to keep the screen active
- A user can also set his system to allow the screen to stay awake for an extended period of time (up to 30 minutes on my A13).
- To avoid it, a Foreground service must be used as you mentioned.
So far, my experience has been similar to yours. My screen time out is set by the Android settings for a longer period than yours (5 minutes) so I experience:
Using installed apk:using ListViewer select on an Android 13, Samsung A(13) cell phone and used Wifi
Started Classic FM 02:16
Screen went to sleep at 02:21
Still playing audio stream at 02:27
Audio paused 02:29
Using ListViewer restarted at 02:29
continued through 02:42 screen went to sleep.
coninued playing through 2:48
that is essentially 22 continuous minutes.
Previously ran continuously for almost an hour by occasionally tapping the screen to stay open.