I can load and reproduce the first audio, but when got out of the widget to load other element with a different audio, and I try reproduce a new audio, the app it falls.
The app says
Exception has occurred. PlatformException (PlatformException(error, null, null))
The console print
E/AndroidRuntime( 5103): java.lang.IllegalStateException E/AndroidRuntime( 5103): at android.media.MediaPlayer.isPlaying(Native Method) E/AndroidRuntime( 5103): at com.idofilus.audio.AudioPlayer$4.run(AudioPlayer.java:232) E/AndroidRuntime( 5103): at android.os.Handler.handleCallback(Handler.java:751) E/AndroidRuntime( 5103): at android.os.Handler.dispatchMessage(Handler.java:95) E/AndroidRuntime( 5103): at android.os.Looper.loop(Looper.java:154) E/AndroidRuntime( 5103): at android.app.ActivityThread.main(ActivityThread.java:6077) E/AndroidRuntime( 5103): at java.lang.reflect.Method.invoke(Native Method) E/AndroidRuntime( 5103): at com.android.internal.os.ZygoteInit$MethodAndArgsCaller.run(ZygoteInit.java:866) E/AndroidRuntime( 5103): at com.android.internal.os.ZygoteInit.main(ZygoteInit.java:756)
I think that maybe it could be the state of thw widgets, so I change it to stateful, but still continue failed.
I can load and reproduce the first audio, but when got out of the widget to load other element with a different audio, and I try reproduce a new audio, the app it falls.
The app says
Exception has occurred. PlatformException (PlatformException(error, null, null))
The console print
E/AndroidRuntime( 5103): java.lang.IllegalStateException E/AndroidRuntime( 5103): at android.media.MediaPlayer.isPlaying(Native Method) E/AndroidRuntime( 5103): at com.idofilus.audio.AudioPlayer$4.run(AudioPlayer.java:232) E/AndroidRuntime( 5103): at android.os.Handler.handleCallback(Handler.java:751) E/AndroidRuntime( 5103): at android.os.Handler.dispatchMessage(Handler.java:95) E/AndroidRuntime( 5103): at android.os.Looper.loop(Looper.java:154) E/AndroidRuntime( 5103): at android.app.ActivityThread.main(ActivityThread.java:6077) E/AndroidRuntime( 5103): at java.lang.reflect.Method.invoke(Native Method) E/AndroidRuntime( 5103): at com.android.internal.os.ZygoteInit$MethodAndArgsCaller.run(ZygoteInit.java:866) E/AndroidRuntime( 5103): at com.android.internal.os.ZygoteInit.main(ZygoteInit.java:756)
I think that maybe it could be the state of thw widgets, so I change it to stateful, but still continue failed.
Someone can help me?