mirror of
https://github.com/kuhyx/wake-alarm.git
synced 2026-11-11 14:07:32 +01:00
Two things, one of them an undo of my own change.
The flash challenge is gone from the phone's rotation. It hides the code after
kDismissFlashSeconds, and on the phone that is unsolvable in practice: the ring
screen is reached by walking to another room and tapping a tag, so the code has
already vanished by the time the user is looking at it. Reported from the phone
as "invisible - impossible to actually do". Every challenge the alarm shows now
stays on screen until it is answered, and a test asserts next() never returns
one that hides itself. The constructor stays for the PC half's parity tests;
nothing routes to it.
The two-channel split is reverted. I introduced it to fix a tag reaching Kotlin
but not Dart, and pointed the push channel at the call channel — which broke
NFC *and* the step counter, both of which had been confirmed working on the
phone one build earlier. The user caught it: "they worked previously so your
changes regressed it". The split was a theory that was never shown to be
necessary; the single channel from 08b44b4 is restored unchanged.
Lesson worth keeping: when hardware has just confirmed a path works, the next
change should be the smallest possible delta on top of that exact state, not a
restructure bundled with a fix.
flutter test: 70 pass. dart analyze lib/ test/: clean.
Co-Authored-By: Claude Opus 5 <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_01EckWmyfetYq3Mi8MAnUudh
23 lines
981 B
Dart
23 lines
981 B
Dart
import 'package:flutter/material.dart';
|
|
|
|
import 'package:wake_alarm_sync/main.dart';
|
|
import 'package:wake_alarm_sync/services/alarm_scheduler.dart';
|
|
|
|
/// Debug entrypoint that starts the ring exactly as a real alarm would.
|
|
///
|
|
/// Calls `ringNow`, which starts AlarmService — the service then posts its
|
|
/// full-screen intent and the system launches AlarmActivity on top. This
|
|
/// process then finishes itself, so the picker never sits in front of the
|
|
/// ring screen: it used to, and AlarmActivity's pause tore NFC reader mode
|
|
/// down with it, which is precisely the bug this probe now has to avoid
|
|
/// reintroducing.
|
|
///
|
|
/// Not part of the shipped app: `flutter build apk` uses `lib/main.dart`.
|
|
Future<void> main() async {
|
|
WidgetsFlutterBinding.ensureInitialized();
|
|
await AlarmScheduler().ringNow();
|
|
// Nothing to show: the ring screen is a separate activity launched by the
|
|
// service. Rendering the picker here would cover it.
|
|
runApp(const WakeAlarmSyncApp());
|
|
}
|