SShortSingh.
Back to feed

Flutter rest timer fix: avoiding Android 14 exact alarm Settings jump and silent alarms

0
·3 views

A developer's offline gym log app opened Android's Alarms & reminders settings page after the first set on Android 14, because the call to requestExactAlarmsPermission() sent users out of the app. Exact alarm permission on Android 12 and later has no runtime dialog, so the only route is a system settings switch that most users never turn on. The app also used an alarmClock schedule mode that required that permission, so for many users the rest alarm never rang at all, and errors were logged silently. The developer removed the Settings request, checked whether exact alarms were allowed before scheduling, and fell back to an inexact alarm mode when they were not. The trade-off is that inexact alarms may fire slightly late during device Doze, which is considered acceptable for a short rest timer.

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 ·

Domain verification design: scheduled MX rechecks and customer-triggered retries

A healthtech onboarding flow can let setup continue while MX record verification runs in the background, reserving the cutover decision for a confirmed result. The approach combines a limited set of scheduled checks with a manual recheck option, so customers need not drive retries themselves. Pending and exhausted states should be communicated distinctly, naming the specific record being awaited. The example uses a fixed schedule of four attempts at 60, 180, 600, and 1,800 seconds, presented as an adjustable operational policy rather than a propagation guarantee. The author stresses data minimization, limiting verification inputs to domain configuration and not claiming the check proves all messages will be delivered.

0
ProgrammingDEV Community ·

DNS zone ownership check before gaming tenant cutover: a Node.js startup safeguard

A DEV Community article argues that a platform should verify which environment owns a DNS zone before accepting tenant provisioning work. It recommends keeping the zone identifier in environment-specific configuration and comparing the zone's actual domain against an independently configured expected domain at startup. If they disagree, the process should exit with failure rather than merely warn. The author uses a hypothetical staging-to-production mismatch drill for a gaming platform, stressing that checking zone selection is separate from deciding when a subdomain is ready for players. The piece also flags capacity concerns, since boot-time control-plane reads can concentrate when a fleet starts together.

0
ProgrammingDEV Community ·

Developer builds a swinging lanyard badge in React without a physics library

A developer wanted an ID badge that swings and flies when grabbed and thrown, but found existing examples relied on heavy physics engines and 3D renderers. Instead, they modeled the strap as a chain of points using Verlet integration, which makes throwing work naturally because each point's velocity is implicit in its previous position. Distance constraints keep the rope lengths consistent, with weighting that makes the card hang and swing like a pendulum. A spring-driven angle adds lag and overshoot, and the developer fixed issues like stretching and runaway flick speeds, while stopping the loop when idle and respecting reduced-motion settings. The complete implementation comes to about 500 lines in a single file with only React and one Motion hook as dependencies.

0
ProgrammingDEV Community ·

TikTok Shop Order Data Can Serve as Pitch Evidence for 7-Eleven Thailand

A guide on TikTok Shop sales data explains how brands in Thailand can turn raw order exports into evidence for pitching to 7-Eleven. It recommends removing cancelled and returned orders, separating near-list-price sales from deep-discount sales, and tracking repeat buyers by first-purchase cohort. It also advises mapping sales by province to show whether demand is national or concentrated. The aim is a concise, shareable summary that a distributor can evaluate, with buyer identifiers hashed to protect privacy.