...
Code Block | ||||||||
---|---|---|---|---|---|---|---|---|
| ||||||||
//Add this to imports : import com.appoxee.AppoxeeANE; ... //Add this to class : private var _appoxeeANE:AppoxeeANE; //Add the class's constructor : _appoxeeANE = new AppoxeeANE("YOUR_APPOXEE_APP_KEY","YOUR_APPOXEE_SECRET_KEY",handleIncomingPushMessage); ... //Add this method to get notified when push messages arrive to the device private function handleIncomingPushMessage(payload:String):void { trace("Handle Incoming Push Message Called with : "+result); //Parse the JSON-Formatted String into an ActionScript Object //All fields from JSON are accessible by theit property names here var data:Object = JSON.parse(payload); //Rest of your logic } |
Parsing the Push Payload
In order to parse the JSON-Formatted String to an ActionScript Object, you will need to use JSON.Parse() method which part of ActionScript, as explained in the following link.
Note | ||
---|---|---|
| ||
Be advised : The Appoxee AppStoreID Extra Field (apx_aid) & The Appoxee URL Extra Field (apx_url) are being handled internally by the plugin. |
...
The following JSON-Formatted Strings are the payloads for Adobe Air under Android OS :
...