Developer builds Android sound manager that works through Doze mode and geofencing
A developer created an Android app called Muffle to automatically manage phone sound profiles based on location and time, after a personally embarrassing moment during a college lecture. Standard background services proved unreliable due to Android's Doze mode and App Standby battery optimizations, which kill background processes when the screen is off. The solution required combining a Foreground Service with AlarmManager's setExactAndAllowWhileIdle to force the OS to wake the app at precise trigger moments. Additional hurdles included handling Do Not Disturb permissions, which fail silently without explicit user authorization, and replacing battery-draining GPS polling with the GeofencingClient API. The project highlights how building reliable background services on Android demands working around aggressive OS-level power management rather than relying on standard execution methods.
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