Android Question MediaBrowser

Robert Valentino

Well-Known Member
Licensed User
Longtime 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
Longtime User
Seems that these files are not listed in MediaStore, I thought by just copying them to my phone would update MediaStore
 
Upvote 0

Robert Valentino

Well-Known Member
Licensed User
Longtime 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?
 
Upvote 0

Informatix

Expert
Licensed User
Longtime 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.
 
Upvote 0
Top