You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Describe the bug
I create a notification using zonedSchedule() and I can see it getting triggered while the app is running after I create it, or after I restart the device (Pixel 5 emulator API 33). However if I restart the device and then relaunch my app, then the notification does not appear. I can see that it's still there both by calling pendingNotificationRequests() and viewing the scheduled_notifications.xml file in shared prefs. If I restart the device again, then the notification will appear. I have reproduced this using my own code and also the sample app from flutter_local_notifications 17.2.2.
To Reproduce
Android emulator running Pixel 5 API 33
Launch the flutter_local_notifications sample app
Changed line 1448 in _zonedScheduleNotification() to create a notification 5 minutes after now (also change buttonText on line 432 to say 'appear in 5 minutes')
Tap button 'Schedule notification to appear in 5 minutes based on local time zone'
Verify that the notification has been saved by tapping 'Check pending notifications' or viewing the scheduled_notifications.xml file
Restart emulator by swiping down from the top twice, tapping the power icon, and then Restart
After restart, launch the sample app
Wait for more than 5 minutes to have elapsed from creating the notification
No notification appears
Verify that the notification still is pending by tapping 'Check pending notifications' or viewing the scheduled_notifications.xml file
Restart emulator again as in step 6
Notification will appear after startup, before launching the sample app
Expected behavior
On step 8 above, I expect the scheduled notification to appear after restart, regardless of whether the app is in foreground or background, or whether it's been launched after restart.
Sample code to reproduce the problem
I have reproduced this using the flutter_local_notifications sample app, v17.2.2, running on a Pixel 5 API 33 emulator.
Doctor summary (to see all details, run flutter doctor -v):
[✓] Flutter (Channel stable, 3.24.0, on macOS 14.6.1 23G93 darwin-arm64, locale en-US)
[✓] Android toolchain - develop for Android devices (Android SDK version 35.0.0)
[✓] Xcode - develop for iOS and macOS (Xcode 15.4)
[✓] Chrome - develop for the web
[✓] Android Studio (version 2024.1)
[✓] VS Code (version 1.92.1)
[✓] Connected device (4 available)
[✓] Network resources
The text was updated successfully, but these errors were encountered:
Wasn't able to reproduce this. I took a video but it's too large to upload here so created a link in case you wanted to see. Note the link will expire I'm not sure how you are running the sample app but how I do it is to have the repository cloned. Mentioning this in case you're copying the Dart code, which may miss some of the platform-specific configuration
Describe the bug
I create a notification using zonedSchedule() and I can see it getting triggered while the app is running after I create it, or after I restart the device (Pixel 5 emulator API 33). However if I restart the device and then relaunch my app, then the notification does not appear. I can see that it's still there both by calling pendingNotificationRequests() and viewing the scheduled_notifications.xml file in shared prefs. If I restart the device again, then the notification will appear. I have reproduced this using my own code and also the sample app from flutter_local_notifications 17.2.2.
To Reproduce
Expected behavior
On step 8 above, I expect the scheduled notification to appear after restart, regardless of whether the app is in foreground or background, or whether it's been launched after restart.
Sample code to reproduce the problem
I have reproduced this using the flutter_local_notifications sample app, v17.2.2, running on a Pixel 5 API 33 emulator.
Doctor summary (to see all details, run flutter doctor -v):
[✓] Flutter (Channel stable, 3.24.0, on macOS 14.6.1 23G93 darwin-arm64, locale en-US)
[✓] Android toolchain - develop for Android devices (Android SDK version 35.0.0)
[✓] Xcode - develop for iOS and macOS (Xcode 15.4)
[✓] Chrome - develop for the web
[✓] Android Studio (version 2024.1)
[✓] VS Code (version 1.92.1)
[✓] Connected device (4 available)
[✓] Network resources
The text was updated successfully, but these errors were encountered: