title: onPause onResume alternative?
body: <p>I've got a bit of a dilemma and not quite sure how to solve it. Here's the scenario...</p>
  
  <p>I have a multi activity application which plays music from the time it starts to the time the application exits.</p>
  
  <p>However, if I use onPause / onResume to detect when the activity is sent to the background and pause the music in onPause and resume play in onResume, the music "skips" briefly when I start the next activity as the calling activity is finished once the startActivity() is called.</p>
  
  <p>If I don't pause / resume the music in onPause / onResume the music plays smoothly but does NOT stop if the home key is pressed and the activity is sent to the back.</p>
  
  <p>Is there a way to detect an activity is sent to the background (using, say a timer and application flag) without having to use onPause / onResume?</p>
  
  <p>If this is not possible or too hard to implement (I'm still learning as we all are), is there a way to create an "invisible" launcher activity which runs in the background to handle such things but never seen?</p>
  
  <p>As always, thanks in advance.</p>