Developer Builds Offline Android App to Auto-Silence Phone Without Draining Battery
A developer was embarrassed when a phone notification sounded during a Friday prayer service, prompting a search for a better way to manage sound profiles. They wanted a local, offline-first app that could switch modes based on location, calendar events, or prayer times without constant server pings or intrusive permissions. Android's background execution limits made this difficult, so they combined a Foreground Service with a persistent notification and WorkManager, and used the GeofencingClient API so the system handles location tracking efficiently. The article also notes that AlarmManager proved unreliable for time-sensitive tasks, particularly on certain manufacturers' devices that aggressively restrict background apps.
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