How to always run a service in the background
<p>I am in the process of creating an app that is similar to the build-in SMS app.</p>

<p>What I need:<br>
- a service that is always running in the background<br>
- every 5 min. the service checks the current location of the device and calls a web service<br>
- if certain criteria are meet, the service should generate a notification (just like the SMS app)<br>
- when the notification is clicked, the user is taken to the app (just like the SMS app)<br>
- when the app is installed the service should be started<br>
- when the device is rebooted, the service should be started  </p>

<p>What I have tried:<br>
- running a regular service which worked just fine until android kills the service<br>
- using the AlarmManager the make the 5 min. interval call to a service. But I was not able to make this work.</p>

<p>Any help would be greatly appreciated...</p>

<p>-Thomas</p>
