Skip to content

Commit 7bef4c5

Browse files
committed
set the wakeup property to true for the alarm
- fixes bell sound delay when the screen is turned off - might fix #8
1 parent 7d77456 commit 7bef4c5

File tree

1 file changed

+2
-1
lines changed

1 file changed

+2
-1
lines changed

lib/widgets/timer_page.dart

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -159,8 +159,9 @@ class _TimerPageState extends State<TimerPage>
159159
infusionFinishTime =
160160
DateTime.now().add(Duration(milliseconds: remainingMs));
161161
if (Platform.isAndroid) {
162+
// not using wakeup true will cause long delays and potentially no sound at all
162163
AndroidAlarmManager.oneShotAt(infusionFinishTime, alarmId, _ring,
163-
allowWhileIdle: true, exact: true);
164+
allowWhileIdle: true, exact: true, wakeup: true);
164165
}
165166
} else {
166167
// pausing

0 commit comments

Comments
 (0)