How one developer built a battery-friendly geofencing app to auto-mute Android phones
A developer built an Android app called Muffle after repeatedly forgetting to silence his phone in class, finding existing solutions either privacy-invasive or battery-draining. Instead of polling GPS at intervals, he used Google Play Services' GeofencingClient, which lets the OS handle location boundary checks efficiently at the system level. He implemented a BroadcastReceiver and JobIntentService to manage audio profile changes reliably, even when the app was killed or the device was in Doze mode. A loitering delay was added to prevent the sound profile from toggling erratically near boundaries. A boot receiver was also built to re-register geofences after a device restart, ensuring the mute logic persists across power cycles.
This is an AI-generated summary. ShortSingh links to the original source for the complete article.
Discussion (0)
Log in to join the discussion and vote.
Log in