rafaelsetragni / awesome_notifications

A complete solution to create Local Notifications and Push Notifications, throught Firebase or another services, using Flutter.
https://discord.awesome-notifications.carda.me
Apache License 2.0
759 stars 328 forks source link

Cancel Schedule When App is Terminated #410

Closed PabloCir closed 2 years ago

PabloCir commented 2 years ago

I am trying to make a missed call notification. When a call type notification is displayed, it launched a 15 second scheduled notification. If someone presses the accept or cancel button, I call the function to cancel the notification scheduled by group key. This works with the App in the background, but if the App is terminated, the scheduled notification is never canceled. Is there a way to do this, is it not possible, or is there a specific way to do it? Thanks

aakashhameed commented 2 years ago

I am also facing a similar issue, I am trying to cancel all the scheduled notifications but after restarting the app if i call the function to cancel All Notifications or cancel all schedules, the scheduled notifications are never cancelled. If i call AwesomeNotifications().listAllSchedules function it does not show all the schedules that were added before restarting the app

rafaelsetragni commented 2 years ago

It seems a problem with Shared Preferences for Android not saving the informations. Can you confirm to me what plugins your app are using and what Gradle version is your app? Did you change anything in your Android project folder?

aakashhameed commented 2 years ago

It seems a problem with Shared Preferences for Android not saving the informations. Can you confirm to me what plugins your app are using and what Gradle version is your app? Did you change anything in your Android project folder?

gradle version -6.7 gradle plugin 4.1.0 plugins list provider: ^6.0.2 get: ^4.6.1 sizer: ^2.0.15 flutter_launcher_icons: ^0.9.2 http: ^0.13.4 flutter_spinkit: ^5.1.0 modal_progress_hud_nsn: ^0.1.0-nullsafety-1 shared_preferences: ^2.0.12 awesome_notifications: ^0.6.21 location: ^4.3.0 fluttertoast: ^8.0.2

and i have not made any changes to android folder

PabloCir commented 2 years ago

My Project have this plugins:

environment: sdk: ">=2.12.0 <3.0.0"

dependencies: animated_splash_screen: ^1.1.0 auto_size_text: ^3.0.0 avatar_glow: ^2.0.2 awesome_notifications: ^0.6.21 badges: ^2.0.1 cloud_firestore: ^3.1.8 cloud_functions: ^3.0.3 cupertino_icons: ^1.0.2 device_info_plus: ^3.2.1 email_validator: ^2.0.1 empty_widget: ^0.0.5 firebase_auth: ^3.0.1 firebase_core: ^1.4.0 firebase_messaging: ^11.2.6 flutter: sdk: flutter flutter_easyloading: ^3.0.0 flutter_local_notifications: ^9.3.2 flutter_localizations: sdk: flutter flutter_mobx: ^2.0.2 flutter_svg: ^1.0.3 font_awesome_flutter: ^9.1.0 google_nav_bar: ^5.0.5 google_sign_in: ^5.0.5 http: ^0.13.3 jitsi_meet: ^4.0.0 line_icons: ^2.0.1 lint: ^1.7.2 mobx: ^2.0.4 modal_bottom_sheet: ^2.0.0 move_to_background: ^1.0.2 package_info: ^2.0.2 provider: ^6.0.0 rflutter_alert: ^2.0.4 share_plus: ^3.0.4 shared_preferences: ^2.0.12 shimmer: ^2.0.0

dev_dependencies: build_runner: ^2.1.2 flutter_launcher_icons: ^0.9.1 flutter_test: sdk: flutter mobx_codegen: ^2.0.3

Gradle: 6.7

rafaelsetragni commented 2 years ago

Hi! Sorry for taking so long to respond to your issue on GitHub. I was focused on releasing the new 0.7.0 version of awesome_notifications and awesome_notifications_fcm and i didn't had time enough to do both. But now I can answer all your questions.

So now i'm asking you to recreate this topic using the new issue template. There's a lot of missing informations that i need to understand your problem, and all the instructions are already in the new issue template. Also, remember to check beforehand if your issue was posted by another user.

So I will automatically close all previous issues so far. Sorry for the inconvenience and i will be waiting for your new issue request.

Thank you so much for your support!