-
Notifications
You must be signed in to change notification settings - Fork 1.4k
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Example App Crashes on Android 6 #881
Comments
|
|
This should be fixed now |
I'm also facing same issue on Android v6.0.1. I cannot reproduce it on Android 9, or 10.
I'm using latest code:
|
I've tried this with the example app and pointed it to 3.0.1+2 (instead of using the path) and couldn't reproduce the issue so going to need a link to repository that reproduces the issue on an Android 6 emulator. I wonder if your app is still pulling an older version and just needs a clean and rebuild |
MaikuB, i have tried an example app, and with example it works fine.. I have tried flutter clean. didn't help. I'll let you know if i'll find something |
Ok, obviously the problem is with I have added this line inside my app MainActivity.kt just after registering an app
of course also added a dependency in build.gradle
Everything is working now on Android v6, also tried on Android v10 My assumption that https://github.com/MaikuB/flutter_local_notifications/blob/4111de48bdbedab632f65ac2892159ba1d22543a/flutter_local_notifications/android/src/main/java/com/dexterous/flutterlocalnotifications/FlutterLocalNotificationsPlugin.java#L148 not triggered in my case. I can try to modify plugin code and identify exact values if you want. |
I have reviewed your code, and it helped me to understand the issue. If we initalize I assume that there are 3 options to fix the issue:
|
@reovo The original scenario reported by @zjamshidi was around after scheduling a recurring notification then once triggered, it failed to schedule the next instance. I thought you had the same scenario. Edit: I may look at adding an assertion to make sure the plugin is initialised before calling methods that trigger/schedule a notification. PRs on this are welcome too |
Describe the bug
When the app is terminated and daily/weekly reminder fires, the app crashes.
To Reproduce
Expected behavior
no crash
Sample code to reproduce the problem
the provided example
here is the crash's stack trace:
The text was updated successfully, but these errors were encountered: