I am trying to set High Priority on an Fcm Notification Payload in C# SDK in order to send it the a mobile application from the Back-End. Standing to the Fcm Documentation the Json Paylod should look like this:
{
"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"
}
}
}
}
In my code i tried diffent ways to do that with the Azure SDK. 1
var result = await voipClient.SendFcmNativeNotificationAsync(payload, tag);
Putting as payload this json
{
"data":{
"key":"value"
},
"android":{
"priority":"high"
}
2
var notification = new FcmNotification(payload);
notification.Headers.Add("android", "{\"priority\": \"high\"}");
Putting ad payload the one i posted before
In both cases i receive the notification with normal priority.
Do you know where i'm making mistakes?