Android Question MediaBrowser (Android 11 and API 30) not working

Robert Valentino

Well-Known Member
Licensed User
Longtime User
Is anyone else using MediaBrowser? Keeps crashing on a call to GetAudioFileInfo

Works with everything I have this is below API 30
 

DonManfred

Expert
Licensed User
Longtime User
And the full error is?
 
Upvote 0

Robert Valentino

Well-Known Member
Licensed User
Longtime User
Sorry forgot
B4X:
RC=false   Main::Gesture_onTouch (X/Y):1204 / 49 - ScreenSaveShowing:false
Main::sMDB_ButtonBar_Play_Click
cBBP_Functions::StartPlaying
cMediaData::ProcessMediaFile  /storage/3864-6563/Music/Lenny Kravitz/Greatest Hits/  15 - Black Velveteen.mp3
cMediaData::ProcessMediaFile  GetAudioFileInfo
cbbp_functions_gettrackinfo (java line: 3123)
java.lang.IllegalArgumentException: Invalid token 15 - Black Velveteen.mp3
    at android.database.DatabaseUtils.readExceptionFromParcel(DatabaseUtils.java:172)
    at android.database.DatabaseUtils.readExceptionFromParcel(DatabaseUtils.java:142)
    at android.content.ContentProviderProxy.query(ContentProviderNative.java:472)
    at android.content.ContentResolver.query(ContentResolver.java:1186)
    at android.content.ContentResolver.query(ContentResolver.java:1118)
    at android.content.ContentResolver.query(ContentResolver.java:1074)
    at flm.media.browser.MediaBrowser.GetAudioFileInfo(MediaBrowser.java:146)
    at com.BOBs.BOBsCommon.cmediadata._processmediafile(cmediadata.java:540)
    at com.BOBs.MusicDB.cbbp_functions._gettrackinfo(cbbp_functions.java:3123)
    at com.BOBs.MusicDB.cbbp_functions._makeinsertqueuetrack(cbbp_functions.java:3381)
    at com.BOBs.MusicDB.cbbp_functions._makeinsertqueuetrackparms(cbbp_functions.java:3411)
    at java.lang.reflect.Method.invoke(Native Method)
    at anywheresoftware.b4a.BA.raiseEvent2(BA.java:213)
    at anywheresoftware.b4a.keywords.Common$11.run(Common.java:1178)
    at android.os.Handler.handleCallback(Handler.java:938)
    at android.os.Handler.dispatchMessage(Handler.java:99)
    at android.os.Looper.loop(Looper.java:246)
    at android.app.ActivityThread.main(ActivityThread.java:8430)
    at java.lang.reflect.Method.invoke(Native Method)
    at com.android.internal.os.RuntimeInit$MethodAndArgsCaller.run(RuntimeInit.java:596)
    at com.android.internal.os.ZygoteInit.main(ZygoteInit.java:1130)
Starter::Application_Error - Application_Error - Sending Crash

Seems like the parameters have changed to GetAudioFileInfo?

NOTE: I have
B4X:
SetApplicationAttribute(android:requestLegacyExternalStorage, true)

Because I haven't converted over yet. Actually once working again that and B4XPages is the goal

Code work fine on everything below API 30 and doesn't matter what song.

But on 30 and above always fails.
 
Upvote 0

hbhb

Member
@Erel Do we need an upgraded MediaBrowser library for this issue? It seems the parameters no longer valid for API>29. I have the same problem with extracting video, audio information.
 
Upvote 0
Top