How to stopService when App is fired

39 views Asked by At

I got a problem puzzling me a long time

Activity A in Application APP

In onDestroy(), I need to call function B() to release some resource, but when I press Home and remove APP, onDestroy() can not be callback. What I should do? Do not call B() in onPause() or onStop()

PS: I am making a Android MusicPlayer, I need to stopService() when App is killed, help!

0

There are 0 answers