Last active
August 29, 2015 13:56
-
-
Save sharpred/9004271 to your computer and use it in GitHub Desktop.
Push Notification. This is a sample push notification payload file that Creator will send to registered devices
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| { | |
| "title": "External Link Example (Get)", | |
| "alert": "Sample Alert", | |
| "icon": "little_star", | |
| "badge": "+1", | |
| "sound": "circus.wav", | |
| "vibrate": false, | |
| "callToAction": { | |
| "action": "B", | |
| "uri": "http: //www.example.com", | |
| "type": "GET" | |
| }, | |
| "urgent": "true", | |
| "homeScreenMessage": "true" | |
| }, | |
| { | |
| "title": "External Link Example (Post)", | |
| "alert": "Sample Alert", | |
| "icon": "little_star", | |
| "badge": "+1", | |
| "sound": "circus.wav", | |
| "vibrate": false, | |
| "callToAction": { | |
| "action": "B", | |
| "uri": "http: //www.example.com", | |
| "type" : "POST", | |
| "form" : [{}] //an array of key/value pair objects to pre-populate an HTTP post form | |
| }, | |
| "urgent": "true", | |
| "homeScreenMessage": "true" | |
| }, | |
| { | |
| "title": "In App Example Flights", | |
| "alert": "Sample Alert", | |
| "icon": "little_star", | |
| "badge": "+1", | |
| "sound": "circus.wav", | |
| "vibrate": false, | |
| "callToAction": { | |
| "action": "P", | |
| "uri": "flights", | |
| "link": {"flightNumber":"BA176"} | |
| }, | |
| "urgent": "true", | |
| "homeScreenMessage": "true" | |
| }, | |
| { | |
| "title": "In App Example Excursions", | |
| "alert": "Sample Alert", | |
| "icon": "little_star", | |
| "badge": "+1", | |
| "sound": "circus.wav", | |
| "vibrate": false, | |
| "callToAction": { | |
| "action": "P", | |
| "uri": "excursion", | |
| "link": {"code":"1008991350"} | |
| }, | |
| "urgent": "false", | |
| "homeScreenMessage": "false" | |
| }, | |
| { | |
| "title": "In App Example Currency", | |
| "alert": "Sample Alert", | |
| "icon": "little_star", | |
| "badge": "+1", | |
| "sound": "circus.wav", | |
| "vibrate": false, | |
| "callToAction": { | |
| "action": "P", | |
| "uri": "foreignCurrency", | |
| "link": {"type":"travelmoney"} | |
| }, | |
| "urgent": "false", | |
| "homeScreenMessage": "false" | |
| } |
Author
I have updated this to reflect Fede's comments and given sample deep links
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Hi Paul,
Looking at the documentation again, I see that messages will always be shown in the 'Customer Inbox' (CI) and Home Screen Biscuit (HSB) so the only optional place is the Home Screen Message (HSM). If this is the case, we could remove the display array and replace it just with an extra boolean field which indicates if the message should be shown in the HSM (this should make the implementation simpler). If we remove the display array, probably we could rename "inbox" to "cta" or "call_to_action". The resulting json will be like this:
{
"title": "Inbox Example",
"alert": "Sample Alert",
"icon": "little_star",
"badge": "+1",
"sound": "circus.wav",
"vibrate": false,
"call_to_action": {
"action": "B",
"uri": "http: //www.example.com"
},
"urgent": "true",
"home_screen_message":"true"
}
What do you think?