I am trying to send a push notification from a Java server to our Corona-based mobile client. I want to have custom fields in a call.
I am 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 am sending above:
{
"aps":{
"badge":10,
"alert":"test",
"sound":"cat.caf"
},
"custom":{
"id":8
}
}
For some reason, it does not come in the user field.
Can someone help me with an example for such a json to send?
Thanks in advance!
source
share