Articles‎ > ‎

Sticky Broadcasts

posted Feb 7, 2012, 1:17 AM by Michael Schollmeyer
Some people asked about the Sticky Broadcast permission that GPS Essentials requests when you install. I believe that the name of this permission has not been chosen wisely because it is a very technical one.

I'll try to explain it as less technical as I can: A broadcast is a message that some piece of an app sends to a different piece. Since GPS Essentials is a rather big app it lives in different processes and uses broadcasts to communicate. For example, when you choose a different unit in settings a broadcast will tell both the dashboard and the map to update its widgets.

Sticky broadcasts add the capability to remain there once it has been fired up by someone. For example, when you start tracking a sticky broadcast will fire up to tell everybody. Even if you open the map after you started tracking the map can still see the broadcast message to see if you are currently tracking.

Since a broadcast message can also be sent from one app to another, Android thinks it is of some security concern and better ask the user for permission.

With the lastest dev version (2.7.0) I moved some of the functionality into services and when this migration is complete, I can hopefully take the sticky broadcast permission down again.