-
Notifications
You must be signed in to change notification settings - Fork 9
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
Notifications still getting duplicated in forground #4
Comments
Hey, @rashmiranjanrrs, Can you share the logs that you get when you receive the notification? I did not face these issues recently, not sure why this is happening. If you want a quick workaround though, for the duplicate notifications, the shouldHandleNotification param is there. You can probably maintain a state variable containing the title and body and check whether to show the notification or not. For the onTap, which was working in all scenarios I tested, can you share what was the app state when you received the notification, and what was the state when you clicked it? Also, to pass channelId and etc. things, for android, there is a param
You just have to set this param, the rest is handled internally... |
I will test it with setting up the channel Id but Will the ontap function will work for both foreground and background? |
Yes, the onTap works for every possible scenario. |
For icon should I do the same like this bellow? |
AndroidManifest.xml
|
No, this icon is the app icon. The param name for this is |
You are not doing anything if the app state is not open... You're passing redirect in the material app.. but the MaterialApp will be created first, and then you'll receive a notification. And then, you're just setting a variable, and nothing else |
Okay let try this but what will do for duplicate notification when the app is in foreground? |
Please suggest something |
As I said, can you share the notification logs, so I can look into it? Because this was fixed in the However, for quick fix, read this: #4 (comment) |
I am in the major refactor branch but still duplicate issue and let me share you the logs |
I can see that the message ID is the same here, but not sure why this is happening. This duplicate notification is a known Firebase issue, but I handled it in this package using unique message IDs. Not sure what is happening in your case. Try to use the shouldHandleNotification param, where you can maintain a state variable containing the title and body and check whether to show the notification. |
PLEASE HELP ITS URGENT
`
firebase_notifications_handler:
git:
url: https://github.com/rithik-dev/firebase_notifications_handler.git
ref: df127ad
`
The text was updated successfully, but these errors were encountered: