Maybe if it helps, this is the (C#) objects I used to send notifications for both IOS and Android.
internal class jsonObj
{
//public bool delay_while_idle { get; set; }
public data data { get; set; }
public notification notification { get; set; }
public string to { get; set; }
public string priority { get; set; }
}
internal class data
{
public int Id { get; set; }
public int commentId { get; set; }
public string type { get; set; }
public string DisplayName { get; set; }
public string licensePlateCode { get; set; }
public int licensePlateId { get; set; }
public string text { get; set; }
}
internal class notification
{
public string title { get; set; }
public string body { get; set; }
public string sound { get; set; }
public string badge { get; set; }
[JsonProperty("content-available")]
public string contentAvailable { get; set; }
}
At the moment of writing that code I used the old WakefulBroadcastReceiver
and IntentService
in android, which is not recommended anymore. But if interested, it looked like this question
EDIT:
OP commented about this post on github. The same issue is described there which is still not fixed (September 2016). Workarounds can be found there, you have to send different requests for IOS and Android.