I want to keep my application running in background I have an application that sends the user\'s location to our server I have the following code:
pu
Run your background logic in a Service, and if you want to give a good UX experience (and to also have an higher priority) post a Notification to status-bar (using NotificationManager).
Service
Notification
NotificationManager