-
Notifications
You must be signed in to change notification settings - Fork 236
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 show duplicates in background state #1173
Comments
@baronha Its happening for me as well but only in iOS. Did you find any solution? |
+1 |
In my experience, there was a case where I sent a notification object along with data. So one notification was created by Android automatically, and the second was created by setBackgroundMessageHandler. So I switched to data-only notifications. |
I found a little hack to make sure duplicates are not sent. It seems work for me by adding message id to each notification, try the following On your backend server (if you are using one), i'm using c#
Add id such as Hope that makes sense to everyone :) |
tried sending data only notifications and it works fine for background and foreground states, but cant receive notifications in quit state. How did you manage to make it work for when app is closed? |
I saw this issue #690, #767 and I don't know how to completely solve the above problem when displaying notification from Firebase's
setBackgroundMessageHandler
. How is this resolved in version7.0.0+
on notifee?Before that I was still able to use firebase's
onNotificationOpenedApp
api and it worked fine.https://rnfirebase.io/messaging/usage#background--quit-state-messages
My code:
Result
The text was updated successfully, but these errors were encountered: