0 votes


I'm using Godot for maybe a month now, still learning stuff. This is my first question.

So I'm building an app that's focused on playing different sounds from the SamplePlayer, changing their volumes, muting/unmuting them and so on. What is essential for the app is for sound to be able to play even while Android screen is locked.

I couldn't find how to do this, I've tried in project settings, SamplePlayer node inspector and tried from the code but was unable to do it. Any help appreciated! :)

in Engine by (12 points)

Are you thinking of having the sound for a long time running even with the screen locked ? i am not sure Godot has this ability natively, IMHO you will have to do some decent hack for it to work and it wont be portable (ios, windows...)

Yes, the sound is looping in SamplePlayer so it would play for a long time. I don't need it portable, only on Android export.
I read it can be done with Android service but I'm not sure how to implement/override that in Godot :(

Bro, did you found a way? :"(

Please log in or register to answer this question.

Welcome to Godot Engine Q&A, where you can ask questions and receive answers from other members of the community.

Please make sure to read How to use this Q&A? before posting your first questions.
Social login is currently unavailable. If you've previously logged in with a Facebook or GitHub account, use the I forgot my password link in the login box to set a password for your account. If you still can't access your account, send an email to webmaster@godotengine.org with your username.