Play multiple songs one after another until all finish


#1

How to code the app to play multiple songs one by one until all finish. Let’s say i want to play 5 songs one after another until all 5 songs completed then only stop. Thanks for replying.


#2

You could create a llst of the songs, and then loop through them in a procedure. You have the Player.Completed function that can be used. I hope that helps you start it.

https://docs.thunkable.com/thunkable-classic-android/create/components/voice/sound-+-player


#3

Hi @Sam_Sim,

Try this code

example

:slightly_smiling_face:


#4

Hi Cian & Moayad, thanks for reply and suggestion. It worked as I expected.

Now, if I want to select a few songs only in the lists and play them till finish.
Let’s say, I want to play Song2 and Song4 only.
How do I create the codes to play the selected songs only?

Thanks for the support.


#5

Hi @Sam_Sim,

I think in this case, The best way is using “ColinTree ListView” extension. Because it has more properties and features than “ListPicker” or “ListView”
If you know how to use it then do that. otherwise I can explain to you more about using “ColinTree ListView”

Thats all

Moayad


#6

you can do selectable list to select some items. But this need more experience. :slight_smile:

I remember that I made it before.

Moayad


#7

You could also set all the songs into a TinyDB. Each song name would be a tag, and the “to play” status would be the value.