How do you use a listpicker to trigger an audio file?

Is it possible to use a list picker or spinner, to play a audio file? If so how. Thank you!

Welcome Ani.

What you do to play an audio file from a ListPicker (or using any event handler) depends on where the audio file is located.

Here is a simple example using a ListPicker to pick audio files stored in Assets (Media).

ListPickerPlayer.aia (59.7 KB)

What do you mean by
set player1 . Source to "___"
What is supposed to go in the blank, and is "flush.mp3" where you put the name of the song file you want to play.

nothing, it is just an empty text box.

It could be. Why not place the name of the song in that List item instead of the mp3 link ? Run the app. What happens? Is it what you expect?

The documentation is ListPicker and Lists blocks , You might also like to read how to work with Lists List Blocks On App Inventor | imagnity A list is what you use to keep track of your music files; the ListPicker is populated from the two item List called musicList.

This a simple example using a ListPicker to pick audio files stored in Assets (Media). You put the mp3 file into Assets. If the sound files are not there then you require significantly more coding.