SShortSingh.
Back to feed

Developer Builds Offline-Only Geofencing App to Auto-Silence Phones in Sensitive Spaces

0
·1 views

A developer created Muffle, an Android app that automatically silences a phone based on location, after an embarrassing ringtone incident during mosque prayers highlighted the failure of manual phone management. The app uses Google Play Services' GeofencingClient combined with a custom logic layer to perform all geofencing entirely on-device, with no cloud calls or API tokens required. To prevent Android's Doze mode from delaying or killing background location triggers, the app runs a ForegroundService, trading a small battery overhead for reliable, real-time transitions. A BroadcastReceiver listens for geofence entry and exit events and invokes the AudioManager directly, ensuring volume changes occur even with the screen off. The developer found that stripping away network-assisted location made GPS alone unreliable indoors, pointing to a deeper challenge in building truly offline-first location-aware systems.

Read the full story at DEV Community

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

Related stories

0
ProgrammingDEV Community ·

AI subscribers pay $200 but cost providers up to $3,500 a month, analysis finds

A detailed analysis by SemiAnalysis found that heavy users of AI subscription plans such as ChatGPT Pro and Claude Max can consume tens of thousands of dollars worth of compute at API prices while paying only $200 per month. The real per-user loss after accounting for lower serving costs is estimated at around $3,500 monthly, roughly 17 times the subscription fee. The shortfall is covered by venture and institutional capital betting that today's usage habits will eventually translate into pricing power. Meanwhile, AI datacenter demand is redirecting DRAM production toward high-bandwidth memory, pushing consumer RAM prices two to three times higher and effectively spreading a hidden cost across all computer buyers. The dynamic mirrors past subsidy-driven growth plays like ride-hailing and cloud computing, but at a far larger multiple.

0
ProgrammingDEV Community ·

Hasura Kubernetes manifests pressure-tested with Ota v1.6.24 and raw kubectl proof

Developer tool Ota v1.6.24 was used to governance-test Hasura's Kubernetes install manifests, separating local manifest interpretation from actual cluster deployment. The test defined three distinct proof levels: local manifest rendering via kubectl annotate --local, cluster resource acceptance via kubectl apply in an ephemeral kind cluster, and full application readiness, with only the first level confirmed on macOS. Ota's contract explicitly declared cross-platform kubectl installation, safe verification tasks, and cluster-mutating apply tasks, keeping them in separate workflow lanes. Apply tasks were excluded from safe task lists to prevent agents from accidentally triggering deployments during routine verification. The work was deliberately scoped to the install-manifests/kubernetes directory, avoiding broader claims about Hasura's full infrastructure.

0
ProgrammingDEV Community ·

Developer Builds Open-Source Proxy to Stop AI Agents From Overrunning API Budgets

A developer building AI agents for several months encountered a costly failure when an agent entered a loop, making repeated API calls that inflated the bill without any obvious crash or error. The incident prompted them to create SpendGuard, an open-source proxy that sits between the user and the agent to enforce spending limits. The tool can cut off mid-stream calls once a budget cap is reached, detect and break repetitive prompt loops before calls are sent, and block specified tool calls such as delete operations. SpendGuard runs locally and requires no account signup, and its code is publicly available on GitHub. The developer is now seeking community feedback to determine whether runaway agent costs are a widespread problem or an isolated personal experience.

0
ProgrammingDEV Community ·

How a Spring @Transactional Misuse Exhausted Database Connections via External I/O

A production incident traced a Hikari connection pool exhaustion to a Spring @Transactional method that enclosed synchronous calls to external systems like ActiveMQ, Firebase, S3, and SMS. Spring's default event listeners run synchronously on the publishing thread, meaning JDBC connections stayed checked out from the pool during network round-trips to the message broker. When the ActiveMQ broker became unavailable, every write request stalled on the JMS send, preventing transactions from committing and draining the pool entirely. New requests then timed out after 30 seconds, surfacing as SQLTransientConnectionException errors. The root cause was a code pattern where database transaction boundaries incorrectly enclosed calls to external systems that the database had no visibility into.

Developer Builds Offline-Only Geofencing App to Auto-Silence Phones in Sensitive Spaces · ShortSingh