Background music several screens

Hi guys! I am finishing the development of an educational game, the enviroment is similar to a western movie, and I want to put a background music (8bit style) throught all the game, ¿Is it possible to play a music in the background continously? I know that I can play it in every screen, but it doesn´t feel very pleasant to stop and start again the same music every time that I change to a different screen (I have five different screens)

Thank you very much!

You should play the music on Screen1 and not close Screen1 when you switch to a another screen. Show your blocks on all screens or post the aia.

1 Like

Hi Anke, thank you very much for your reply. I attach you an screenshot of my blocks in my screen 1, it is a very simple login screen, and I also attach the design of my “login screen” (screen 1). I tried to play the music only in screen 1, but the music plays about 4 secs and then it stops, even if I don´t change the screen. I think that maybe appinventor is not for this kind of purpose (play countinously a background music) it is a really pitty, because it is the only thing that I wanted to do to finish de project.


1 Like

Are you using the Sound component or the Player component?
(The Sound component is only for short sounds 2-3 seconds long)

1 Like

I tried it now, and… It works! you saved my life! I didn´t realise that there are two different players depending on the lenght of the sound!

Note: If you want to play a sound for a long time, you will need to loop it. The Sound component does not have this capability, but the Player component does.

However, since Android 6 the Player component can no longer loop seamlessly (gapless). You should therefore use the TaifunPlayer extension App Inventor Extensions: Audio Player | Pura Vida Apps. You also need to use OGG as the audio format, since the MP3 format is basically not loop-able.


Hi Anke, tested and working, much better extension than the default media player of appinventor, loop and volume are in the general options of the extension, very easy to use, thank you and thanks to puravidaapps. I think that this problem was solved in a very sucessfully way. Thank you very much!!


This topic was automatically closed 7 days after the last reply. New replies are no longer allowed.