quickstart-js icon indicating copy to clipboard operation
quickstart-js copied to clipboard

Messaging example README update

Open sgoran opened this issue 8 years ago • 3 comments

Can you update README for https://github.com/firebase/quickstart-js/tree/master/messaging

The part that if the FCM sends notification: {} object setBackgroundMessageHandler will not trigger.

I was debugging that for a while, and noticed other people had the same problem

sgoran avatar Apr 30 '18 13:04 sgoran

@kroikie Can you have a look?

nicolasgarnier avatar Apr 30 '18 17:04 nicolasgarnier

Here is the documentation that says that a message with notification payload will be handled by the SDK and not by the user defined function in setBackgroundMessageHandler.

Basically, if you want your message handler to handle the message, you should not add a notification payload to your message (even if it is empty). You can put the same payload inside data if you wish.

We could add something similar to the README.

mmermerkaya avatar May 01 '18 11:05 mmermerkaya

How to send notifications from Firebase console to web applications without using the device token

BharadhanVM avatar Oct 07 '19 06:10 BharadhanVM