You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
When I send a message with contentAvailable set to true,
The setBackgroundMessageHandler on the background device triggers normally,
But the onMessage on the foreground device does not trigger.
When I send a message with contentAvailable set to false,
The setBackgroundMessageHandler on the background device does not trigger,
But the onMessage on the foreground device triggers normally.
However, I want to send a message:
The background device triggers setBackgroundMessageHandler,
And the foreground device triggers onMessage.
So that I can collect the count of message arrivals.
This is intended behavior based on the partial information in your issue
One type of FCM will be delivered in the background and trigger the background handler
One type of FCM will be posted more as a notification and trigger the foreground handler after user interaction
Suggestion: Make a more universal handler that can be registered for all the callbacks, count delivery in that single place.
Either way: without knowing the exact contents of the FCM you send to the device and the handler code (as a minimal reproducible example) I would not expect authoritative answers, as there is no authoritative information to work with
Issue
When I send a message with
contentAvailable
set totrue
,The setBackgroundMessageHandler on the background device triggers normally,
But the onMessage on the foreground device does not trigger.
When I send a message with
contentAvailable
set tofalse
,The setBackgroundMessageHandler on the background device does not trigger,
But the onMessage on the foreground device triggers normally.
However, I want to send a message:
The background device triggers setBackgroundMessageHandler,
And the foreground device triggers onMessage.
So that I can collect the count of message arrivals.
Project Files.
package.json
Click To Expand
index.js.
Click To Expand
nodejs.
Click To Expand
Environment
Click To Expand
react-native info
output:react-native-firebase
version you're using that has this issue:Firebase
module(s) you're using that has the issue:TypeScript
?React Native Firebase
andInvertase
on Twitter for updates on the library.The text was updated successfully, but these errors were encountered: