Versions Compared

Key

  • This line was added.
  • This line was removed.
  • Formatting was changed.

...

In order to parse the JSON-Formatted String to a JSON Object, you will need to use a utility class to do so.

Info
titleJsonUtility usage

As of Unity3D ver 5.3, the Class JsonUtility is introduced to help parse json object. Please refer to Unity's manual here.

If you are using Unity3D version lower than 5.3 , you may use other JSON parsing open source projects, such as JSONObject or SimpleJSON.

The following JSON-Formatted Strings are the payloads for Adobe Air under Android OS : 

Code Block
languagejs
titleAndroid Push Notification Payloads
//No Extra Fields , No Sound , Regular Push : 
{
 "alert":"Push Message with no extra fields",
 "push_description":"Push Message with no extra fields",
 "p":"301226468",
 "collapse_key":"301226468"
}

//No Extra Fields , With Sound , Regular Push : 
{
 "push_description":"Push Message with no extra fields but with sound",
 "collapse_key":"301233338",
 "sound":"appoxeesound.wav",
 "alert":"Push Message with no extra fields but with sound",
 "p":"301233338"
}

//With Extra Fields , With Sound , Regular Push : 
{
 "SampleKey2":"SampleValue2",
 "SampleKey1":"SampleValue1",
 "push_description":"Push Message with regular extra fields and with sound",
 "collapse_key":"301249598",
 "sound":"appoxeesound.wav",
 "alert":"Push Message with regular extra fields and with sound",
 "p":"301249598"
}

//With Website URL , With Sound , Regular Push : 
{
 "push_description":"Push Message with URL and with sound",
 "collapse_key":"301253096",
 "apx_url":"http:\/\/www.appoxee.com",
 "sound":"appoxeesound.wav",
 "alert":"Push Message with URL and with sound",
 "p":"301253096"
}

//With AppStoreID , With Sound , Regular Push : 
{
 "push_description":"Push Message with AppStoreID and with sound",
 "collapse_key":"301253096",
 "apx_aid":"com.facebook.katana",
 "sound":"appoxeesound.wav",
 "alert":"Push Message with URL and with sound",
 "p":"301253096"
}

//With DeepLink , With Sound , Regular Push : 
{
 "push_description":"Push Message with DeepLink and with sound",
 "collapse_key":"301253096",
 "apx_dpl":"sample://route/to/target",
 "sound":"appoxeesound.wav",
 "alert":"Push Message with URL and with sound",
 "p":"301253096"
}

 

The following JSON-Formatted Strings are the payloads for Adobe Air under iOS : 
Code Block
languagejs
titleiOS Push Notification Payloads
//Push With Sample Extra Payload
{
	"isRich":false,
	"badge":1,
	"didLaunchApp":false,
	"uniqueID":302044226,
	"extraFields":		
			{"SampleKey1":"SampleVal1",
			 "SampleKey2":"SampleVal2"},
	"isTriggerUpdate":false,
	"alert":"Extra Fields Test",
	"pushAction":
			{"actionButtons":[{}],
			 "appoxeeCategory":false
			},
	"isSilent":false
}
//Push With URL Payload
{
	"isRich":false,
	"badge":0,
	"didLaunchApp":false,
	"uniqueID":302030012,
	"extraFields":
		{"apx_url":"http:\/\/www.walla.co.il"},
	"isTriggerUpdate":false,
	"alert":"Web URL",
	"pushAction":
		{"actionButtons":[{}],"appoxeeCategory":false}
	,"isSilent":false
}

//Push With AppStoreID Payload
{
	"isRich":false,
	"badge":0,
	"didLaunchApp":false,
	"uniqueID":302034194,
	"extraFields":
		{"apx_aid":"12345678"},
	"isTriggerUpdate":false,
	"alert":"App Store ID",
	"pushAction":
		{"actionButtons":[{}],"appoxeeCategory":false}
	,"isSilent":false
}
 
//Push With DeepLink Payload
{
	"isRich":false,
	"badge":1,
	"didLaunchApp":false,
	"uniqueID":302018762,
	"extraFields":
		{"apx_dpl":"myAppScheme:\/\/Go\/To\/Here"},
	"isTriggerUpdate":false,
	"alert":"iOS DPL",
	"pushAction":{"actionButtons":[{}],"appoxeeCategory":false},
	"isSilent":false
}