mirror of
https://github.com/kuhyx/wake-alarm.git
synced 2026-11-11 16:33:48 +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 |
||
|---|---|---|
| .. | ||
| android | ||
| assets/icon | ||
| lib | ||
| test | ||
| .gitignore | ||
| .metadata | ||
| analysis_options.yaml | ||
| pubspec.lock | ||
| pubspec.yaml | ||
| README.md | ||
wake_alarm_sync
A new Flutter project.
Getting Started
This project is a starting point for a Flutter application.
A few resources to get you started if this is your first Flutter project:
For help getting started with Flutter development, view the online documentation, which offers tutorials, samples, guidance on mobile development, and a full API reference.