Android Question MediaBrowser

Discussion in 'Android Questions' started by Robert Valentino, Jan 22, 2015.

Similar threads

B4A Code Snippet [B4X] Bytes To File
B4A Tutorial MJPEG / CCTV Server
B4A Question Force media scanner on deleted file
B4A Code Snippet PyJSON
B4A Library Printing and Pdf creation
  1. Robert Valentino

    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

    Code:
    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: Jan 22, 2015
  2. Robert Valentino

    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
     
  3. Robert Valentino

    Robert Valentino Well-Known Member Licensed User

    when I do a
    Code:
    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?
     
  4. Informatix

    Informatix Expert Licensed User

    No, you have to reboot the phone or use the Reflection (or JavaObject) library to register them in the MediaStore.
     
  5. Informatix

    Informatix Expert Licensed User

    They are stored in lowercase by your OS. I don't convert anything in the library.
     
Loading...
  1. This site uses cookies to help personalise content, tailor your experience and to keep you logged in if you register.
    By continuing to use this site, you are consenting to our use of cookies.
    Dismiss Notice