Custom data on FirebaseAdmin.Messaging.Notification?
See original GitHub issueHello,
I’m trying to send a notification with this sdk and I’m supposed to set "click_action":"FCM_PLUGIN_ACTIVITY"
on the notification object so that our cordova app can handle click events. Is there any way to do this via the sdk?
Issue Analytics
- State:
- Created 4 years ago
- Comments:6 (3 by maintainers)
Top Results From Across the Web
About FCM messages | Firebase Cloud Messaging - Google
Notification messages contain a predefined set of user-visible keys. Data messages, by contrast, contain only your user-defined custom key-value pairs.
Read more >Build app server send requests | Firebase Cloud Messaging
You can send messages with a notification payload made up of predefined fields, a data payload of your own user-defined fields, or a...
Read more >Make a custom data for parameter on firebase to call ...
I want to create custom data in Firebase to call that data on my push notification. At least that data can call on...
Read more >Sending Push Notifications by Using Firebase Cloud ...
You can add this kind of messages if you want to send some only data along with the notification. It contains custom key...
Read more >Cloud Messaging
The remoteMessage property contains all of the information about the message sent to the device from FCM, including any custom data (via the...
Read more >Top Related Medium Post
No results found
Top Related StackOverflow Question
No results found
Troubleshoot Live Code
Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start FreeTop Related Reddit Thread
No results found
Top Related Hackernoon Post
No results found
Top Related Tweet
No results found
Top Related Dev.to Post
No results found
Top Related Hashnode Post
No results found
Top GitHub Comments
click_action
is only available forAndroidNotification
in the v1 API: https://firebase.google.com/docs/reference/fcm/rest/v1/projects.messages#androidnotificationHi halomademeapc, the fields in Notification object all map to fields in all platforms (Android, iOS, and Webpush). But if I understand it correctly, clieck_action do not have a corresponding field in iOS https://developer.apple.com/library/archive/documentation/NetworkingInternet/Conceptual/RemoteNotificationsPG/PayloadKeyReference.html#//apple_ref/doc/uid/TP40008194-CH17-SW1 therefore it makes less sense to have it in the Notification object.
I assume you have an Android app. Setting it in AndroidNotification should be the correct approach. If it does not have any effect on your Android app, could you double check if your app’s implementation in handling the notification’s click_action works as intended.