Hi all,
Noob here on the forum. Been gettign feet wet with B4A. I have a little experience with VB6 so a lot is familiar. Problem is I am playing around with MediaPlayer and for the life of me cannot load a mp3 from the sd card on my Samsung Charge. I have played a file from DirAssets no problem but no luck with DirRootExternal or DirDefaultExternal. Here is the section of interest.
I have tried a number of different combination but always get "Prepare Fails" java message when the code runs.
I have searched the forum and seen several similiar issues but no solution that has worked for me.
This code returns /mnt/sdcard/Android/data/find.filepath/files
Probably something simple but after several hours struggling with this I must ask for help.
Thanks
Noob here on the forum. Been gettign feet wet with B4A. I have a little experience with VB6 so a lot is familiar. Problem is I am playing around with MediaPlayer and for the life of me cannot load a mp3 from the sd card on my Samsung Charge. I have played a file from DirAssets no problem but no luck with DirRootExternal or DirDefaultExternal. Here is the section of interest.
B4X:
Sub Activity_Create(FirstTime As Boolean)
If FirstTime Then
Timer1.Initialize("Timer1", 1000)
End If
Activity.LoadLayout("exp_layout1")
Label1.Text = "UncleRich"
MediaPlayer1.Initialize( )
MediaPlayer1.Load(File.DirRootExternal,"/music/track1.mp3") 'does no work
End Sub
I have searched the forum and seen several similiar issues but no solution that has worked for me.
This code returns /mnt/sdcard/Android/data/find.filepath/files
B4X:
Sub Activity_Create(FirstTime As Boolean)
Activity.LoadLayout("1")
label1.Text = File.DirDefaultExternal
End Sub
Probably something simple but after several hours struggling with this I must ask for help.
Thanks
Last edited: