nicholasjackson/PebbleBike-AndroidApp — pull request #5 by jay3 (2013-06-22 19:18:59+00:00)
Title:  Make GPS service foreground to prevent to be killed by the system

http://developer.android.com/guide/components/services.html#Foreground
A foreground service is a service that's considered to be something the user is actively aware of and thus not a candidate for the system to kill when low on memory. A foreground service must provide a notification for the status bar, which is placed under the "Ongoing" heading, which means that the notification cannot be dismissed unless the service is either stopped or removed from the foreground.
For example, a music player that plays music from a service should be set to run in the foreground, because the user is explicitly aware of its operation. The notification in the status bar might indicate the current song and allow the user to launch an activity to interact with the music player.