Radio app stops when running in background


I have build this app for our radiostation with a audio stream button using audio player. It works fine for about 15 min running in the background and screen turned off and then the stream stops. You then have to maximize the app and press stop and play again and it runs for about 15 more minutes. Other radio apps work fine on my phone? Please help someone.

Jess Pedersen


I had a similar issue and was able to resolve it by turning off Battery Optimization:

How to block energy saver

I see what you mean. But it’s only in my app. Not in any other radio apps I have on my phone. And I cant say when releasing the app that you have to turn off battery optimization for it to work :grin:


I’ve done a little more research.

It appears that this would only potentially affect Android OS 6.0 Marshmallow API23 and newer devices.

Prior to the update to SDK26, changing this setting programmatically wasn’t possible.
AI/AB used SDK22 and these settings came out in SDK23.

I will let the developers know and hopefully they can come up with a fix.


Ok thank you very much :slight_smile: Fingers crossed


same problem , i wish it will be fix soon


It’s a very important problem I think. It makes the feature and in the end the app useless


My stream runs for about 10 minutes and then stops.


I also have almost same problem.
I hope developer’s may not ignore this problem and fix it asap.


Here the same issue, radio app stops playing after 5 minutes on battery with screen off.
Phone connected on the charger, then music don’t stop.

Android 8.0 and with Tunein App it works fine.

Is there allready a fix?


For now you need to do it manually:

You can use the ActivityStarter to get them to the correct screen though:


Thanks for the information.
But when I Try this It goes to optimize battery usage menu of the phone. (Android 8.0)


Ok I understand what you mean.