Firebase Fcm Notifications Click_Action Payload

Firebase FCM notifications click_action payload

If your app is in background, Firebase will not trigger onMessageReceived(). Why.....? I have no idea. In this situation, I do not see any point in implementing FirebaseMessagingService.

According to docs, if you want to process background message arrival, you have to send 'click_action' with your message.
But it is not possible if you send message from Firebase console, only via Firebase API.
It means you will have to build your own "console" in order to enable marketing people to use it. So, this makes Firebase console also quite useless!

There is really good, promising, idea behind this new tool, but executed badly.

I suppose we will have to wait for new versions and improvements/fixes!

click_action attribute for web push notification through FCM

I've got the same issue here.

After some trial, as Adrien said, it works but just not documented yet.

And also not included in admin SDK as well. (at least in Python, which I'm using)

Refer to another answer to the same question https://stackoverflow.com/a/52764782/1318878

You can use custom data to do it.

Here's how I create a notification with click action in Python:

notification=messaging.WebpushNotification(
title=<your_title>,
body=<your_body>,
custom_data={"click_action": <your_url>}
)


Related Topics



Leave a reply



Submit