I build an Android app in Flutter that reminds people at set times of day. The screens took a week. Making the reminder actually arrive took longer, and almost none of it was Flutter code.

These are the notes I wish I had at the start. They cover a scheduled local reminder, not a push notification from a server.

A Dart timer is not a scheduler

Timer.periodic and Future.delayed run while your app process is alive and awake. Once the screen goes off and the system reclaims the process, the callback is gone. Nothing tells the user. The reminder simply never arrives, and the review says the app is broken.

Anything that has to survive that has to be scheduled with the platform, not with Dart.

Schedule with AlarmManager, from Kotlin

In my app the Dart side works out the next reminder time and calls a platform channel. The Kotlin side sets an alarm with AlarmManager and a PendingIntent that fires a BroadcastReceiver. The receiver does the small thing that has to happen at that moment.

Keep the receiver short. It runs on the main thread with a limited window. If the work is more than a few seconds, hand it to WorkManager or a foreground service.

Alarms do not survive a reboot

This one bit me. Android cancels alarms when the device shuts down, so every reminder scheduled before a restart is quietly gone.

The fix is two pieces: the RECEIVE_BOOT_COMPLETED permission, and a receiver that listens for ACTION_BOOT_COMPLETED and schedules everything again from the app's current state. That reschedule path is the same code you need when the user changes a setting, so write it once and call it from both places.

Exact alarms need permission on Android 12 and later

If your app targets Android 12 (API 31) or higher, an exact alarm needs the "Alarms and reminders" special access. Without it you get a SecurityException. Declare SCHEDULE_EXACT_ALARM and check canScheduleExactAlarms() before you set anything. When it returns false, send the user to the settings screen and reschedule when they come back.

On Android 13 and later you can declare USE_EXACT_ALARM instead. It is granted automatically and cannot be revoked, but it is meant for apps whose core function is an alarm clock or calendar, and Google Play policy applies to it. A reminder feature inside a bigger app should probably stay on SCHEDULE_EXACT_ALARM.

Doze will move your alarm

Battery saving delays alarms. On Android 12 and later an inexact alarm fires within an hour of the trigger time, and if the device is idle in Doze a plain set() can be pushed further. If a reminder has to land near the minute, the tool is an exact alarm with setExactAndAllowWhileIdle(). It is expensive for the battery, so use it for the reminders that genuinely need it and not for everything.

The phone maker's battery manager is the real boss

Xiaomi, Oppo, vivo and others ship an extra layer that kills background apps. Your alarm can be scheduled perfectly and still never fire. No code of yours prevents that.

What helped was asking the user, inside the app, to exclude the app from battery optimization, with a short line explaining why before sending them to the settings screen. And testing on a real device from each brand that matters, with the screen off, for a full day.

On-screen reminders and notifications need their own permissions

If the reminder appears over other apps, that is the "display over other apps" permission, and it is better to explain it in context before the system dialog appears. On Android 13 and later POST_NOTIFICATIONS is a runtime permission, so the first reminder can fail silently if the user never granted it.

The checklist I now run before shipping a reminder feature

  • Reboot the phone, wait for the reminder time. Does it fire?
  • Force stop the app. Does it fire?
  • Screen off, battery saver on. Does it fire?
  • Change the time zone. Does the next reminder land at the right local time?
  • Deny the exact alarm permission. Does the app explain itself and recover?
  • Install on a second brand. Does it fire there?

None of this is exotic. It is just the part of Android that does not show up in a widget test. The reminder is the product, and if it does not arrive, nothing else in the app matters.

If you have shipped reminders on Android, I would like to hear what else bites.

Ashraf Alrashidi is a computer science student in Egypt who builds Android apps with Flutter.