Closed ZaidQ797 closed 1 year ago
Hi there, we'll need
JSON.stringify
if the payload you receiveit may be that your payload is not what you think it is so the title/body are empty, generating the empty notification? I'm unaware of any firebase SDK behavior that will generate an empty notification for you so I can only speculate without seeing the JSON FCM that will trigger this
https://stackoverflow.com/help/how-to-ask
It would be best to condense this to a single index.js as a reproduction (https://stackoverflow.com/help/minimal-reproducible-example)
You can format your code nicely with triple-backticks and a language designator (like javascript
) so it's more readable
I'm surprised you display a second notification in the background/quit state, as you have not specified any background message handler logic, so you have no code running there. I suspect you have omitted some necessary steps in the reproduction steps like for example "when I tap on the notification..."
It was header issue on backend and its fixed from backend
Hi @ZaidQ797 I am facing the same issue. Can you let me know which header was causing the issue?
Hi @ZaidQ797 I am facing the same issue. Can you let me know which header was causing the issue?
its on backend side.You can check the apns and alert type in this article. https://firebase.google.com/docs/cloud-messaging/send-message
I also facing same issue, @ZaidQ797, could you tell me more detail?
facing the same issue, one notification is displayed by notifee.display() and another one firebase with default properties, reopen this
Sending data only notifications fixed the issue for me
Sending data only notifications fixed the issue for me
that bad solution, server always need to send notification content, no only data
Hi, any solution on this? So this is what I encounter.
No notification
property from the backend - this fixes the issue if the app is in foreground/minimized app but failed when the app is totally closed/quit . . without the notification property the notification will not work when the app is in kill mode.
With notification
property from the backend - this fixes the issue when the app is in kill mode, but there are two notifications received . . one is the default firebase and 2 is the notifee display
is there a way to override the firebase?
Hi folks I'm using notifee with Firebase Messaging in react native project.When I send notification from FMC I receive only one notification that is good but When notification is sent from my server and app is in background or Killed state I receive Two notifications the first one contains nothing just empty notification and another notification is that I'm displaying with notifee as notifee.displayNotification({title:'Title',body:'Body'}).
And I'm setting background Handler in index.js like this
messaging().setBackgroundMessageHandler(async remoteMessage => {})
I tried to add display notification code in Background Handler as well but if I left empty or add displayNotification code both cases receiving two notifications.