Can someone give me a hand?
This is how I envision it. Suppose you have a database in xui.defaultfolder with a table that has 2 columns: FileName and Description:
1. You can use a select query to populate an xCustomlistview from the database located in internal with an item layout that has 2 labels. One label shows the fileName, the other the Description. The xCLV returned value needs to be the text of the 1st label, exple: CustomListView1.Add(Pnl, Label1.Text)
2. In the CustomListView1_ItemClick you have this code:
Private Sub CustomListView1_ItemClick (Index As Int, Value As Object)
Dim s As String = Value
s = $"${s}.mp3"$ 'note I add the extension of the file in Assets
MP.Load(File.DirAssets, s)
MP.play
End Sub
You declare the media player in Sub Class_Globals if you use a B4XPages project: Private MP As MediaPlayer.
You initialize it in Sub B4XPage_Created with: MP.Initialize2("MP")
The files ' names in the Assets folder have the same name as the FileName column in the SQLite table. example: the assets shows sample1.mp3, but the table FileName has sampl1 without the extension. So when you click the xCLV item it adds the .mp3 extension as shown in the above code.
If you still have difficulty, post some sample files or your project, you will get help.