Reputation: 151
I'm trying to send a push notification from a Java server to our Corona-based mobile client. I want to have custom fields in the call.
I'm using the following (javapns library)
String rawJSON = "{\"aps\": {\"badge\": 10,\"alert\": \"test\",\"sound\": \"cat.caf\"},\"custom\":{\"id\":8}}";
PushNotificationPayload payload = PushNotificationPayload.fromJSON(rawJSON);
This is the json I'm sending in the above:
{
"aps":{
"badge":10,
"alert":"test",
"sound":"cat.caf"
},
"custom":{
"id":8
}
}
For some reason, it doesn't arrive in the custom field.
Can anyone help me with an example for such json that needs to be sent ?
Thanks in advance !
Upvotes: 6
Views: 2437