-
Notifications
You must be signed in to change notification settings - Fork 325
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
MissingPluginException(No implementation found for method createNewNotification on channel awesome_notifications) #18
Comments
How are you calling it from background? Paste here a code example |
So I have my backgroundMessageHandler in main.dart
When onBackground triggered, i show notification by call showNotification() method above.
Whenever I called showNotification from any screen, the notif is show. But, when onbackground notification triggered, the error happened.
|
It seems like the plugin is not beeing initialized by Flutter on your background fetch. So there is no native handle registred to receive your background call. Can you share with me your project on github to me reproduce this error? Edit: |
I created a mini example of how I used the package in https://github.com/bayuramadeza/Awesome-Notification-FCM, Nope, I didn't use background_fetch |
Im fixing your source. First, you SHOULD NOT USE firebase messaging classes on your project directly. You should strictly follow the steps to How to show Local Notifications and, to use firebase messaging which is optional, you should follow the steps to Using Firebase Services (Optional). Do not do anything else than what is indicate on the documentation. All the firebase class to send FCM was already implemented, managed and installed inside the Awesome Notifications plugin. You dont need to do anything else. Also, you must respect the structure specified in How to send Push Notifications using Firebase Cloud Messaging (FCM) and do not send push notifications with "notification" field, only "data". Edit: Example DONE |
Thanks!! It works now.
|
And also you can control if your notification will automatically shows on foreground or background, using the variables
You can check all those combinations on our Notification Life Cycle and Flutter Streams topics. Also, i do recommend you to watch this video about Dart Streams: |
Can i put your example code on our README documentation? This will allows the others to use this example to learn how to use Awesome Notifications and Firebase Cloud Messaging more easly. And, of course, I want to include your name as thanks for helping the community. Can i? |
Okay, Thankyou so much for your explanation. I got it, |
@rafaelsetragni |
Hi, I followed your instruction about how to use this package.
So, I added initialize channel in my main.dart
Then I call create notification from the app, it's work
But, when i call it from background, push notification, i got the error mesage
What's wrong?
The text was updated successfully, but these errors were encountered: