title: How to stopService when App is fired
body: <p>I got a problem puzzling me a long time</p>
  
  <p>Activity <strong>A</strong> in Application <strong>APP</strong></p>
  
  <p>In onDestroy(), I need to call function <strong>B()</strong> to release some resource, but when I press Home and remove <strong>APP</strong>, onDestroy() can not be callback. What I should do? Do not call <strong>B()</strong> in onPause() or onStop()</p>
  
  <p>PS: I am making a Android MusicPlayer, I need to stopService() when <strong>App</strong> is killed, help!</p>