Trying to use the Media Player in B4J. Getting a Error occurred on line: 103 (Main) java.lang.IllegalArgumentException: java.net.URISyntaxException: Illegal character in path at index 4: 1105 Yakima Street Disc 1.mp3
This is coming from not knowing exactly how to Initialize the Media Player with a file from a directory other than DirAssets.
This works:
This doesn't:
This is coming from not knowing exactly how to Initialize the Media Player with a file from a directory other than DirAssets.
This works:
B4X:
Sub btnStart_Action
mp.Initialize("mp", File.GetUri(File.DirAssets, "1105 Yakima Street Disc 1.mp3"))
End Sub
This doesn't:
B4X:
Sub cmbVolumes_ValueChanged(strVolume As String)
strVolumePath = strVolume
Log("SVP = " & strVolume) 'SVP = C:\\Users\larry\Music\Tiff_MP3s\1105 Yakima Street\1105 Yakima Street Disc 1.mp3
strVolumeFile = File.GetName(strVolume)
Log("SVF = " & strVolumeFile)'SVF = 1105 Yakima Street Disc 1.mp3
End Sub
Sub btnStart_Action
mp.Initialize("mp" , strVolumeFile) 'This is the line that causes the error
End Sub
Last edited: