Android Question Mediaplayer Exception

wizard699

Active Member
Licensed User
Longtime User
I've this error on some phone ...

java.lang.IllegalStateException:
at anywheresoftware.b4a.objects.Timer.setEnabled (Timer.java:79)
at in.domain.appname.home._mp_streamready (home.java:604)
at java.lang.reflect.Method.invoke (Native Method)
at anywheresoftware.b4a.BA.raiseEvent2 (BA.java:186)
at anywheresoftware.b4a.BA.raiseEvent (BA.java:166)
at anywheresoftware.b4a.audio.MediaPlayerStreamWrapper$3.onPrepared (MediaPlayerStreamWrapper.java:107)
at android.media.MediaPlayer$EventHandler.handleMessage (MediaPlayer.java:2824)
at android.os.Handler.dispatchMessage (Handler.java:102)
at android.os.Looper.loop (Looper.java:154)
at android.app.ActivityThread.main (ActivityThread.java:5523)
at java.lang.reflect.Method.invoke (Native Method)
at com.android.internal.os.ZygoteInit$MethodAndArgsCaller.run (ZygoteInit.java:739)
at com.android.internal.os.ZygoteInit.main (ZygoteInit.java:629)

What's the problem?

The code workflow is very simple ....

Activity_Create .... initialize mp, set 2000ms for timer and then load url
In StremReady ... enable timer
In timer_tick .... Play mp

I've used a timer to start 2 second late playing stream (url is a radio station) after stremReady
 
Top