Sub Activity_Create(FirstTime As Boolean)
Activity.LoadLayout("1")
Player.Initialize("Player")
sources.Initialize
For i = 1 To 31 'load the audio files
Dim FileNumber As String = ZeroFill(i, True, 3)
Dim Filename As String = "File_001_" & FileNumber & ".mp3"
sources.Add(Player.CreateFileSource(File.DirAssets, Filename))
Next
Player.Prepare(Player.CreateListSource(sources))
Player.Play
PlayerEx.Intialize(Player)
…
End Sub
INDEX here indicates the row within the CustomListview1 that represents this audio file
Sub CustomListView1_ItemClick (Index As Int, Value As Object)
Player.Initialize("Player")
PlayerEx.CurrentWindowIndex = (Index + 1) Mod PlayerEx.WindowCount 'it blows up here with a null reference
Player.Play
End Sub