# Exploration: Alarm Live Countdown & Snooze Dismiss ## Feature 1: Live countdown in pre-notice notification ### Current state `PluriWaveAlarmReceiver.showPreNoticeNotification()` posts a single notification with hardcoded Spanish text `"Empieza en 30 minutos"`. No l10n, no update mechanism. Notification ID is deterministic (`53 * alarmId.hashCode() + 7`), enabling in-place updates. ### Recommended approach (B) Compute remaining minutes at fire time: `(triggerAtMillis - System.currentTimeMillis()) / 60_000`. Use existing translated `durationMinutesOnly` key (`"{minutes} min"`) already available in all 13 locales. ### Why not live updates - AlarmManager chain (30 PendingIntents): quota risk on API 31+ - Foreground service: MIUI/OneUI/ColorOS kill aggressively (~60% of market) - Flutter Timer.periodic: only works when app is foregrounded ## Feature 2: Snooze dismisses modal reliably ### Current state `_posponer()` calls `navigator.pop()` but when app is launched from dead state via full-screen intent, Navigator stack is empty and `pop()` is a no-op. Screen stays visible. ### Fix ```dart if (navigator.canPop()) { navigator.pop(); } else { SystemNavigator.pop(); } ``` ## Affected Files - `android/.../PluriWaveAlarmReceiver.kt` — compute remaining, l10n-ready text - `lib/pantallas/pantalla_alarma_sonando.dart` — canPop guard - `lib/l10n/app_*.arb` — new pre-notice l10n key if needed