• After 15+ years, we've made a big change: Android Forums is now Early Bird Club. Learn more here.

Help How to keep music player going all night

landmark

Lurker
I like to sleep to the sound of rain, and instead of using a white noise app, I prefer to use an hour-long audio file of rain sounds on repeat. The problem is my phone at some point during the night goes quiet, and I can't figure out why. In my half-awake state, I restart the sounds, but later on, again they've stopped.

This problem happens when I put the track on repeat and also when I make a playlist of several instances of the track. It happens with different music players. When I'm awake, I test the transitions between tracks or the repeat, everything seems to work fine.

The stopping doesn't happen when I use a white noise app.

How do I keep the sounds from stopping when using an mp3 player?

I'm using Android 9 on a Sony Experia.
 
I found a Bluetooth "power saving feature" setting in my settings under Battery. I added the music apps as "power-saving exceptions," meaning they'll now not be restricted in the background. I wonder if that will help. FWIW, I have my phone plugged in at night anyway.
 
I seemed to have figured it out. I had to enable the developer tools (which were hidden/turned off on my phone) and then check "Stay awake - screen will never sleep while charging." I turn off the screen manually so at least the light is off and keep the phone charging, of course. It seems to be working.
 
You should exclude your music app from Battery Optimization.

Also you can try 'Pinning' the app, which should keep it running as a foreground app.
The methods for this vary, but on mine it has been generally...

Settings
Security
Screen pinning
 
Back
Top Bottom