We were unable to load Disqus. If you are a moderator please see our troubleshooting guide.

Pip Jones • 1 year ago

Thanks for the article - it's so much clearer than the official docs! I was most interested in the part: "if you click on the notification, the custom data payload ... is sent to the onMessage handler. " but this doesn't happen in the trials I've been doing?

I have data messages which I noticed were not being delivered when the web app is in the background (i.e. browser is focuses on a different tab). So adding a "notification" section to the message does indeed make them turn up in the O/S notifications area and when you click them it does focus the app browser tab - but the onMessage handler is not triggered for these "resends".

Can you confirm this still works in the updated FCM API?

Pip Jones • 1 year ago

They updated to a new API with a slightly different message structure - the click_actions have been moved to either "android" or to "webpush.fcm_optons.link".
https://firebase.google.com...

e.g. https://firebase.google.com...

WonderPush • 4 years ago

Thank you for sharing the valuable information about the react native push notifications

Risyandi • 5 years ago

Thanks, it's very helpful