mirror of
https://github.com/kuhyx/wake-alarm.git
synced 2026-11-11 18:14:04 +01:00
Hand-written Kotlin behind ONE MethodChannel, never a plugin: AGP 9.0.1 / Gradle 9.1 / Kotlin 2.3.20 is bleeding edge and a plugin that will not compile breaks the build outright rather than degrading. - AlarmScheduler: setAlarmClock() (Doze-exempt, no SCHEDULE_EXACT_ALARM prompt), persists the time so boot and dismiss can re-arm. - AlarmReceiver: hands straight to the service — a receiver gets ~10s and no wakelock, so nothing that must outlive it belongs there. - AlarmService: foreground service, PARTIAL_WAKE_LOCK, USAGE_ALARM (= STREAM_ALARM, which is what ignores DND and silent mode), looping ringtone, vibration, full-screen intent over the lockscreen. - AlarmActivity: showWhenLocked + turnScreenOn, routes to the Dart ring screen, back is a no-op so the alarm cannot be escaped. - BootReceiver: re-arms on BOOT_COMPLETED; AlarmManager drops alarms across a reboot. - StepCounter: TYPE_STEP_COUNTER baseline for item 3's fallback proof, also hand-written to keep plugin risk off this path. Details that are a hard crash or a silent no-ring rather than a warning: FLAG_IMMUTABLE on every PendingIntent (mandatory since API 31); foregroundServiceType declared on the <service> AND passed to startForeground(); explicit android:exported on every component; USE_FULL_SCREEN_INTENT declared (missing from the plan's list) and canUseFullScreenIntent() exposed so the Dart side can gate rather than warn. Every permission verified present in android-36's api-versions.xml rather than from recall. Compiles green with `flutter build apk --debug`. Co-Authored-By: Claude Opus 5 <noreply@anthropic.com> Claude-Session: https://claude.ai/code/session_01EckWmyfetYq3Mi8MAnUudh |
||
|---|---|---|
| .. | ||
| src | ||
| build.gradle.kts | ||