fcm
fcm copied to clipboard
iOS and Android differences
It might be worthwhile to document the different fields of Message
which are for iOS, Android, or both.
Hi @bontibon If you need docs, here is description https://firebase.google.com/docs/cloud-messaging/http-server-ref#notification-payload-support
Later, I am gonna update GoDoc, or, if you want, you can do it :)
It looks like fcm.Message
does not even support the platform specific fields looking at https://firebase.google.com/docs/cloud-messaging/concept-options#setting-the-priority-of-a-message these fields should be sent as
{
"message":{
"topic":"subscriber-updates",
"notification":{
"body" : "This week's edition is now available.",
"title" : "NewsMagazine.com",
},
"data" : {
"volume" : "3.21.15",
"contents" : "http://www.news-magazine.com/world-week/21659772"
},
"android":{
"priority":"normal"
},
"apns":{
"headers":{
"apns-priority":"5"
}
},
"webpush": {
"headers": {
"Urgency": "high"
}
}
}
}
But fcm.Message
lacks the fields for "android", "apns", and "webpush" or does this project strictly use the legacy API documented here https://firebase.google.com/docs/cloud-messaging/http-server-ref
@vendion this lib supports only legacy fcm API, no new (v1) API.