The instruction: "mp.Release" when can be used?, and if used, what it has to be done to play another stream, I keep getting "illegal errors", I've noticed that if you just "stop" the stream continues downloading.
Sub Process_Globals
Dim m As As MediaPlayerStream
End Sub
....
Sub PlaySomething
...
m.Stop
m.Release
Dim m As As MediaPlayerStream
m.Initialize("m")
End Sub
I had a user give me this error:
Is this the same error as NJ DUDE?
Cause ANR keyDispatchingTimedOut
B4X:
DALVIK THREADS:
(mutexes: tll=0 tsl=0 tscl=0 ghl=0 hwl=0 hwll=0)
"main" prio=5 tid=1 NATIVE
| group="main" sCount=1 dsCount=0 obj=0x40027550 self=0xcfc0
| sysTid=23859 nice=0 sched=0/0 cgrp=default handle=-1345006240
| schedstat=( 449951179 618225094 484 )
at android.media.MediaPlayer.native_setup(Native Method)
at android.media.MediaPlayer.<init>(MediaPlayer.java:555)
at anywheresoftware.b4a.objects.MediaPlayerWrapper.Initialize(MediaPlayerWrapper.java:37)
at anywheresoftware.b4a.objects.MediaPlayerWrapper.Initialize2(MediaPlayerWrapper.java:44)
at anywheresoftware.b4a.audio.MediaPlayerStreamWrapper.Initialize(MediaPlayerStreamWrapper.java:64)
at Android.Beta.Radio.main._activity_resume(main.java:276)
at java.lang.reflect.Method.invokeNative(Native Method)
at java.lang.reflect.Method.invoke(Method.java:507)
at anywheresoftware.b4a.BA.raiseEvent2(BA.java:105)
at anywheresoftware.b4a.BA.raiseEvent(BA.java:89)
at Android.Beta.Radio.main.afterFirstLayout(main.java:90)
at Android.Beta.Radio.main.access$100(main.java:16)
at Android.Beta.Radio.main$WaitForLayout.run(main.java:72)
at android.os.Handler.handleCallback(Handler.java:587)
at android.os.Handler.dispatchMessage(Handler.java:92)
at android.os.Looper.loop(Looper.java:143)
at android.app.ActivityThread.main(ActivityThread.java:4196)
at java.lang.reflect.Method.invokeNative(Native Method)
at java.lang.reflect.Method.invoke(Method.java:507)
at com.android.internal.os.ZygoteInit$MethodAndArgsCaller.run(ZygoteInit.java:839)
at com.android.internal.os.ZygoteInit.main(ZygoteInit.java:597)
at dalvik.system.NativeStart.main(Native Method)