Scheduled flutter_local_notifications never appear when the app is closed
Notification shows while the app is open, but not when it is closed or the phone restartedShort answer
Local notifications are scheduled with the system, so they should fire while the app is closed. When they do not, the usual causes are the Android 13 notification permission, a missing exact-alarm permission, no timezone setup for zonedSchedule, missing manifest receivers after reboot, or a phone vendor that kills background work.
Fix it fast
1Find out which cause you have
Schedule a notification a minute ahead, close the app, and look at the Flutter or logcat output when you do so. Then work through the causes in order.
adb logcat -s flutter2Match what you see, then jump to its fix
- 1
Nothing shows at all on Android 13 or newer, or on iOSThe notification permission was never requestedFix - 2
Scheduled notifications never fire, the plugin logs an error about exact alarmsExact alarm permission is missing or was revokedFix - 3
The call to zonedSchedule fails or fires at the wrong timeTimezone data was not initialised for zonedScheduleFix - 4
They fire until the phone restarts or the app is updatedScheduled notifications vanish after a reboot or updateFix - 5
Everything is configured, yet it fails on phones from some makers onlyThe phone maker blocks background workFix
- 1
What does the error look like?
Notification shows while the app is open, but not when it is closed or the phone restartedzonedSchedule does nothing, with no error shown
Cause 1 of 5
The notification permission was never requested
1Check
The package declares POST_NOTIFICATIONS, and on Android 13 and above you must request it at runtime. iOS asks through its own permission request.
grep -rn "requestNotificationsPermission\|requestPermissions" lib/2Fix
Call the request once, from a screen the user sees.
await flutterLocalNotificationsPlugin
.resolvePlatformSpecificImplementation<
AndroidFlutterLocalNotificationsPlugin>()
?.requestNotificationsPermission();3Verify
A notification fired immediately with show appears.
# call flutterLocalNotificationsPlugin.show(...) from a buttonConfirmed by pub.dev
Cause 2 of 5
Exact alarm permission is missing or was revoked
1Check
Exact scheduling needs SCHEDULE_EXACT_ALARM (requested from the user) or USE_EXACT_ALARM (no prompt, API 33+, store review applies). If permission is revoked, the plugin logs an error and a repeating notification is not scheduled.
grep -n "EXACT_ALARM" android/app/src/main/AndroidManifest.xml2Fix
Add the permission, ask for it, or switch to an inexact schedule mode.
<uses-permission android:name="android.permission.SCHEDULE_EXACT_ALARM"/>
await androidImplementation?.requestExactAlarmsPermission();3Verify
A notification scheduled a minute ahead fires with the app closed.
adb logcat -s flutterConfirmed by pub.dev
Cause 3 of 5
Timezone data was not initialised for zonedSchedule
1Check
zonedSchedule takes a TZDateTime. The timezone package must be a dependency, and tz.initializeTimeZones() must run first. The package cannot detect the device zone by itself.
grep -rn "initializeTimeZones\|setLocalLocation" lib/2Fix
Initialise the timezone data at startup and set the local location.
import 'package:timezone/data/latest_all.dart' as tz;
tz.initializeTimeZones();3Verify
The scheduled time matches the device clock.
flutter runConfirmed by pub.dev
Cause 4 of 5
Scheduled notifications vanish after a reboot or update
1Check
The plugin needs RECEIVE_BOOT_COMPLETED plus its ScheduledNotificationReceiver and ScheduledNotificationBootReceiver entries in the manifest.
grep -n "ScheduledNotification\|BOOT_COMPLETED" android/app/src/main/AndroidManifest.xml2Fix
Add the permission and both receivers exactly as the package readme lists them.
# copy the receiver entries from the flutter_local_notifications readme into <application>3Verify
Restart the phone and see the notification still fire.
adb rebootConfirmed by pub.dev
Cause 5 of 5
The phone maker blocks background work
1Check
The readme names Xiaomi and Huawei as makers that stop apps from running in the background, and says the plugin cannot fix it. It also reports that Samsung limits scheduled alarms to 500.
# compare on a second phone from another maker2Fix
Ask users to change the device's battery and background settings. dontkillmyapp.com lists the steps by device.
# follow the per-device steps listed on dontkillmyapp.com3Verify
Notifications fire with the app closed on that phone.
adb logcat -s flutterConfirmed by pub.dev
How do I stop it coming back?
- Request notification permission at a clear point in the flow, not at install.
- Test scheduled alerts on a closed app, a rebooted phone and a second brand of phone.
- Keep the manifest entries from the package readme when upgrading the package.
Sources
How was this page made?
I drafted this page with AI assistance from the official documents listed under Sources. Every cause above names the document that confirms it. I have not reproduced this fix on a machine of my own yet, so read it as documented guidance, not a test report. Found a mistake? Tell me.
Which stack is behind this page?
Projects of mine built on the same technologies:
- TaxiDexMy own multi-tenant taxi dispatch SaaS: API, dispatcher portal, driver and passenger apps, and the servers underneath.
- QistLockA NestJS and React SaaS driving an Android Device Owner agent that locks financed phones when payments lapse.
- Dispatch ProA real-time logistics platform: Flutter apps, Spring Boot services and a Kafka event pipeline on AWS.
Related fixes
Mobile apps
Flutter Image.network shows nothing or throws when the image fails
EXCEPTION: resolving an image codec
Image.network throws an exception that goes to FlutterError.onError when a download or decode fails, so a 404 leaves a red screen or an empty box.
3 causes, each with a fixMobile apps
image_picker closes the app or returns nothing after choosing a photo
With launchMode singleInstance the picker always returns RESULT_CANCELED
On Android the system can kill MainActivity while the picker is open, so the app restarts and the result never arrives.
3 causes, each with a fixMobile apps
CLIENT_ID and REVERSED_CLIENT_ID are not in GoogleService-Info.plist
ANDROID_CLIENT_ID is missing from GoogleService-Info.plist
Firebase's Google sign-in steps enable the Google provider first and only then have you download a new GoogleService-Info.plist.
2 causes, each with a fixMobile apps
flutter_local_notifications throws ArgumentError: iOS settings must be set
Android settings must be set when targeting Android platform.
The plugin's initialize call checks that InitializationSettings holds settings for the platform the app is running on.
3 causes, each with a fixMobile apps
Flutter cannot open a file: OS Error No such file or directory
FileSystemException: Cannot open file, path = '...' (OS Error: No such file or directory, errno = 2)
Errno 2 means the exact path you gave does not exist on the device.
3 causes, each with a fixMobile apps
flutter_tts does not speak, or stops early, on Android or iOS
Text to speech works on one phone but not on another
Check platform setup first.
5 causes, each with a fix