Audio Stops If Screen Is Off Or If You Back Out Of App

I have built an app that is essentially just a mirror of our church website. Basically, when you open the app, you are actually on the mobile version of the church website.

I primarily created the app so that our members can listen to sermons. The audio files themselves are on our website.

The problem is, that if you are listening to the audio on the app, and the screen times out, after a few minutes the audio will stop. As soon as you turn the screen on and open the phone back up, it will pick up where it left off.

Also, the same problem happens if you back out of the app, (without closing it), and do other things.

If you leave the screen on, it will play all the way through, with no problems. I need an answer for how I can keep the audio playing, even if the app has is out of focus.

i built a catholic app that helps people pray the rosary of the virgin mary.

I went through the same problem as you.

My solution (which I don’t know if it’s the best) was to “BLOCK” the possibility of the screen going into sleep mode.

I used the Flow Function [ SET WAKE LOCK ] leaving it as TRUE inside the Global Canvas.

For me it worked. And in my case, the audio only stops playing when in another part of the application I STOP the instance I started.

See if this works and if it works for your needs.

Please forgive me for not completely understanding: I am new to Appgyver. Did this make the app think that the screen was off? Or did it just keep the screen for going off?

I’m also new to AppGyver, and more than that, I don’t understand programming…

But what I noticed is that the Flow Function [ SET WAKE LOCK ] made the cell phone screen NOT TURN OFF.

So much so that in the tests I did, I have an audio that is 1 hour long. I left it ringing and didn’t touch my phone.

During the entire time of the audio, the cell phone did not turn off the screen. She got turned on.

Try this feature…

On the left side of your COMPOSER screen, at the bottom, where the Flow Functions are, search for SET WAKE LOCK and see how it works.

Hope this helps you.