Ensure MediaPlayer onCompletionListener is called and the thread is not dead

后端 未结 2 680
爱一瞬间的悲伤
爱一瞬间的悲伤 2021-01-24 10:00

I have a recurrent alarm that triggers a BroadcastReceiver that starts an IntentService that plays a sound using MediaPlayer. However, my OnCompletionListener (used for realeasi

2条回答
  •  不知归路
    2021-01-24 11:05

    For Controll Media player that are play via local service, it is better to send Media player reference to other class Like CarefulMediaPlayer(mp, this);. You handle all media player properties in this class. I think it help you.

    Thanks

提交回复
热议问题