I have been developing an app that plays calming music and also pulls random audio tracks from a database list to stream one after another. When this list is over, it repopulates and continues playing in a random order.
The issue I’m having as I test the app, is that when my phone screen turns off after a few minutes, the background music loop continues unhindered, but these shuffled audio tracks stop after about 1 or 2 minutes. Usually they do not even start up again when I unlock my screen, unless I move away from that Media screen and come back, restarting that screen.
This is a problem, because the point of the app is to help people sleep… so the app really needs to continue playing, even if the phone screen turns off!
Many thanks for any assistance!