SShortSingh.
Back to feed

Developer Builds Battery-Friendly Android App That Auto-Silences Phone by Location

0
·1 views

A developer created an Android app called Muffle after being embarrassed by his phone ringing during a mosque sermon, highlighting the recurring problem of manual Do Not Disturb management. The app uses Google Play Services' GeofencingClient API instead of continuous GPS polling, allowing the system to monitor location boundaries efficiently using cell towers and Wi-Fi rather than raw GPS. When a user crosses a defined geographic boundary, the system fires a PendingIntent that wakes the app only as needed, avoiding persistent background battery drain. A BroadcastReceiver listening for device reboots automatically re-registers geofences, keeping rules active without user intervention. A priority queue handles overlapping triggers by enforcing the strictest sound profile, though Android's Doze mode and manufacturer-specific battery optimizations proved to be the most unpredictable challenges during development.

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 ·

Developer finds test suite missed 1,029 lines due to tests built only on clean inputs

A software developer discovered that a security guard script meant to prevent cross-project file access was blind to 1,029 of 6,309 monitored lines, including 824 executable ones, despite three tests staying green for months. The flaw went undetected because all three tests used only clean, violation-free inputs, meaning a broken detector and a working one produced identical results. The core mistake, the developer explains, is building test suites solely from negative cases — files that should return no violations — which cannot distinguish a functioning rule from a completely blind one. The fix requires every detector test to include both a case that must trigger a finding and one that must not, ensuring neither a permissive nor a blind rule can silently pass. The developer also recommends validating tests against synthetic inputs and previous broken versions of the detector to confirm the new tests genuinely discriminate between correct and faulty behaviour.

0
ProgrammingDEV Community ·

PHP Internals Tackles Non-ASCII Identifiers, PEAR Deprecation, and Base-Function Errors

In the week of September 2, 2026, PHP internals saw active discussion on three fronts. Luca Rodenhäuser proposed restricting non-ASCII identifiers in PHP after scanning 5,000 Packagist packages revealed over 1,400 such identifiers, mostly in the math-php library, prompting him to split his proposal into diagnostic, well-formedness, and conformance rules. Nick Sdot advanced an RFC to remove PHP's official endorsement of PEAR, citing the package repository as largely broken, spam-ridden, and unmaintained, with only one independent package — Net_SMTP — still actively maintained. Sjoerd Langkemper announced plans to call a vote on making base-conversion functions like octdec and hexdec throw a ValueError on invalid input, framing it as a procedural formality following earlier consensus. Tim Düsterhus pushed back, arguing these functions are commonly used with untrusted input and that throwing from the Error hierarchy — not intended to be caught — would be a poor design choice.

0
ProgrammingDEV Community ·

Engineer Discovers AI Voice Selection System Was Penalizing Candidates for a Non-Issue

A developer built an automated system to score and rank AI voice model candidates using metrics like Whisper transcription match rate, speech rate, and jitter. The system rejected candidates whose generated audio contained hallucinations — fabricated words appended to short sentences by the diffusion TTS engine used during corpus creation. Further investigation revealed that these hallucinations were a quirk of the voice-generation pipeline and did not appear in the final trained models that users actually hear. When probe sentences were lengthened to eliminate hallucinations, top-ranked candidates changed, exposing that the metric was measuring process behavior rather than actual voice quality. The engineer concluded that the scoring system had been filtering out candidates based on a manufacturing defect that was both fixable and absent from the shipped product.

0
ProgrammingDEV Community ·

AI Crawlers Read a Site 10,000 Times But Sent Only 2 Human Visitors

A WordPress site called davaonline.net, running a plugin designed to track AI crawler activity rather than human traffic, recorded 13,306 AI crawler requests over 30 days, of which 10,202 targeted actual content pages. Despite this heavy machine-side activity, conventional analytics showed just two human referrals from AI sources — one from ChatGPT and one from DuckDuckGo. The plugin categorises requests by purpose, distinguishing between training data collection, search indexing, and live user-query fetches, with the latter reaching 1,902 requests — a 3,558% increase over the prior 30-day period. The data illustrates a growing disconnect: AI systems are actively retrieving and using web content to answer user questions in real time, but those answers are delivered without routing the user back to the source page. The findings suggest that standard web analytics, which measure human visits, may increasingly undercount how often a site's content is actually being read and used.

Developer Builds Battery-Friendly Android App That Auto-Silences Phone by Location · ShortSingh