Android Question MediaBrowser

Robert Valentino

Well-Known Member
Licensed User
When I execute the code below I get a empty Map FileDir and FileName are valid because I just loaded the file and played it.

MPMap has a zero size

B4X:
	Dim  MediaBrowserInfo         As MediaBrowser
        Dim  MBMap                            As Map


      MediaBrowserInfo.Initialize("")

      MBMap = MediaBrowserInfo.GetAudioFileInfo(FileDir, FileName)
My FileDir = "/storage/sdcard0/BOBs/MusicDB/"
My FileName = "MP3File3.mp3"

Both of which are valid
 
Last edited:

Robert Valentino

Well-Known Member
Licensed User
Seems that these files are not listed in MediaStore, I thought by just copying them to my phone would update MediaStore
 

Robert Valentino

Well-Known Member
Licensed User
when I do a
B4X:
MediaBrowserInfo.GetMediaAudioList(True, "_data")
The Map of files returned does show the file I am trying to get above but when I query it by FileDir FileName I get nothing


Figured it out.
FileName needs to be Lower Case.
The File directories are Mixed case but for some reason the all the files names are lower case

Is this a MediaBrowser bug or feature?
 

Informatix

Expert
Licensed User
when I do a
B4X:
MediaBrowserInfo.GetMediaAudioList(True, "_data")
The Map of files returned does show the file I am trying to get above but when I query it by FileDir FileName I get nothing


Figured it out.
FileName needs to be Lower Case.
The File directories are Mixed case but for some reason the all the files names are lower case

Is this a MediaBrowser bug or feature?
They are stored in lowercase by your OS. I don't convert anything in the library.
 
Top