Prestissimo
Prestissimo copied to clipboard
play back ANR?
Hi.man! when i just back to my homeActivity from the player activity .it will ANR often . so i try to disable the SoundService in my manifest config,it will back success,and never ANR,I guess your SoundService maybe have some problem . for Example synchronized error ,i mean lock bad. and i found that your SoundService need add like this if (track != null) {//do your code..},well,it's safe project. Thanks.
Did you find an error in a specific section of code? A null pointer should result in a crash, not an ANR. Is your problem specific to AntennaPod? If so, I'm thinking it more has to do with what gets executed when the callback to the player is called.
ok .i only use the presto_client-0.8.5.jar. I have not use the AntennaPod. and i use the media's interface such as " mMediaPlayer.setOnPreparedListener(new com.aocate.media.MediaPlayer.OnPreparedListener() {" .. mMediaPlayer.setOnBufferingUpdateListener(new com.aocate.media.MediaPlayer.OnBufferingUpdateListener() . when i back to homeActivity. on my MediaPlayerActivity's onDestroy ,this's my code: if (observer != null) { observer.stop(); } if (mMediaPlayer != null) { mMediaPlayer.stop(); mMediaPlayer.reset(); mMediaPlayer.release(); currentRange = ""; nm.cancel(1); if (mediaPlaybackTimer != null) { mediaPlaybackTimer.cancel(); } mMediaPlayer = null; }
so, what's wrong??? i just use this library like android system media player control. i guess when i release the media your library not on stop at this time ,such as stop slow or another . Thanks.
And , i have test that if not use your library (your SoundService). ANR not appear ,so i have guess my last answers.and often tell me this log:
02-28 10:37:34.697 24936-24936/com.eusoft.ting.en E/ActivityThread﹕ Activity com.eusoft.ting.ui.ReaderActivity has leaked ServiceConnection com.aocate.media.ServiceBackedMediaPlayer$1@42ccf1d0 that was originally bound here
android.app.ServiceConnectionLeaked: Activity com.eusoft.ting.ui.ReaderActivity has leaked ServiceConnection com.aocate.media.ServiceBackedMediaPlayer$1@42ccf1d0 that was originally bound here
at android.app.LoadedApk$ServiceDispatcher.
I mean some problems between the presto's custom mediaPlayer and your SoundService. how to fix it ??? Thanks.