How do you detect when a sound file has finished?

前端 未结 3 1325
面向向阳花
面向向阳花 2020-12-05 17:18

I am playing a sound file using this code inside a broadcast receiver activity:

notification.sound = Uri.parse(\"android.resource://emad.app/raw/seven_chimes         


        
3条回答
  •  醉酒成梦
    2020-12-05 17:44

    try using service to play the music.. after it play once, then stop your service and you can add your program on the onDestroy() service method.. hope it helps :)

提交回复
热议问题