How to let the Android OS know my App has stuff to do when it is background?
<p>I am designing an android app that needs to play a sound every minute while in its active state.</p>

<p>I have the logic that plays the sound every minute in the active state using a runnable and handler. The app works fine if you press the start or stop buttons. </p>

<p>If you run the app and hit stop it kills the app. If you run the app hit home the sounds continue to play and when you relaunch the timer will be up to date. This is expected.</p>

<p>The problem i am having is that if you hit home and then launch another app, there is a high chance my app gets killed and the sounds will no longer play (and consequently GUI will is reset when you relaunch)</p>

<p>My question is, <strong>What approach should i use so that my app will continue to play the sounds until i tell it to stop, even if its not in the foreground?</strong> The sounds can be thought of as a reminder to the user.</p>

<p>I have tried using the google machine to help me out but am having no luck.</p>
