Push Notification recive Data
Hi guys,
i send this via push notification to the device:
{"aps":{"alert":"This is the alert text","badge":1,"sound":"default"},"server":{"serverId":"1","name":"test"}}
with the callback in Ti:
callback:function(e)
{
// called when a push notification is received.
alert(JSON.stringify(e.data));
}
i only get this:
{"alert":"This is the alert text","badge":1,"sound":"default"}
Any ideas how to solve the problem and get the 'server' objekt
4 Answers
-
You need to move the server object inside the aps array as follows:
{"aps":{"alert":"This is the alert text","badge":1,"sound":"default","server":{"serverId":"1","name":"test"}}}
-
But how can I retrieve the server property?
-
-subscribing-
-
But how can I retrieve the server property?