How do i play music even after screent gets locked!

Hello Experts,

I’m working on an app for better sleep. I was developing that app with mit app inventor but i ask myself everyday, can i do it in gdevelop?!

The only the that’s stopping me is, i don’t know how to play music in the background just like an audio or mp3 player apps. I have looked into youtube, trying to find the tutorial to make it happen in gdevelop but couldn’t find anything good in there. And then i thought okay may be i should try posting in in forums cause i have got lots of solutions from here.

So, here am i looking for a solution to play music/audio while the phone is locked! Let me know how to do it if you know it.

Cheers! :innocent::pray:

I don’t think it works that directly. But you could prevent the Android device from falling asleep and darken the screen so that too much battery is not lost. The user would then have to close the app independently to reactivate falling asleep.
At least that wouldn’t be a problem.