Hello, I used this code for a radio streaming apps which worked previously.
But after updating the exoplayer library to 1.30 and adding the new aar files, and using targetSdk of 29, I kept getting this error
B4X:
Dim jo As JavaObject = Starter.exo
Dim event As Object = jo.CreateEventFromUI("com.google.android.exoplayer2.ExoPlayer$EventListener", "statechanged", False)
jo.GetFieldJO("player").RunMethod("addListener", Array(event))
But after updating the exoplayer library to 1.30 and adding the new aar files, and using targetSdk of 29, I kept getting this error
B4X:
** Service (starter) Start **
** Activity (main) Create, isFirst = true **
main_activity_create (java line: 383)
java.lang.ClassNotFoundException: com.google$android$exoplayer2$ExoPlayer$EventListener
at anywheresoftware.b4j.object.JavaObject.getCorrectClassName(JavaObject.java:288)
at anywheresoftware.b4j.object.JavaObject.createEvent(JavaObject.java:252)
at anywheresoftware.b4j.object.JavaObject.CreateEventFromUI(JavaObject.java:222)
at com.leafecodes.missionsradio.main._activity_create(main.java:383)
at java.lang.reflect.Method.invoke(Native Method)
at anywheresoftware.b4a.BA.raiseEvent2(BA.java:196)
at com.leafecodes.missionsradio.main.afterFirstLayout(main.java:104)
at com.leafecodes.missionsradio.main.access$000(main.java:17)
at com.leafecodes.missionsradio.main$WaitForLayout.run(main.java:82)
at android.os.Handler.handleCallback(Handler.java:873)
at android.os.Handler.dispatchMessage(Handler.java:99)
at android.os.Looper.loop(Looper.java:214)
at android.app.ActivityThread.main(ActivityThread.java:7076)
at java.lang.reflect.Method.invoke(Native Method)
at com.android.internal.os.RuntimeInit$MethodAndArgsCaller.run(RuntimeInit.java:493)
at com.android.internal.os.ZygoteInit.main(ZygoteInit.java:965)