开发者

Play audio before finish();

开发者 https://www.devze.com 2023-03-28 08:37 出处:网络
I have method playAudio(); I want execute this method, after call f开发者_C百科inish() on Activity. When I call finish, the audio breaks.

I have method playAudio(); I want execute this method, after call f开发者_C百科inish() on Activity. When I call finish, the audio breaks.

Sample Activity A and B I want this

A (front and call B)

B (front)

B (play sound before! after finish())

A (front...).


You can overrride the onDestroy Method. There you can play your sound and then call the super method to finish. Reference: http://developer.android.com/reference/android/app/Activity.html#onDestroy%28%29

0

精彩评论

暂无评论...
验证码 换一张
取 消