Notification data can be sent by the back end as a generic HTTP headers or as device platform-specific HTTP headers.
http[s]://<host:port/Notification>/<registration id>
The generic HTTP header is used in the HTTP request to send any notification type such as APNS, GCM, Blackberry, or WNS.
Header format for notification data in SAP Mobile Platform 3.x and later:
<X-SMP-DATA>
Use these APNS-specific HTTP headers to send APNS notifications via SAP Mobile Platform:
Header Structure (SAP Mobile Platform and later) | Consists of |
---|---|
<X-SMP-APNS-ALERT> | A JSON document. You can use this header or other individual headers listed in this table. |
<X-SMP-APNS-ALERT-BODY> | Text of the alert message. |
<X-SMP-APNS-ALERT-ACTION-LOC-KEY> | If a string is specified, this header shows an alert with two buttons: Close and View. iOS uses the string as a key to get a localized string for the correct button title instead of View. If the value is null, the system shows an alert. Clicking OK dismisses the alert. |
<X-SMP-APNS-ALERT-LOC-KEY> | Key to an alert-message string in a Localizable.strings file for the current localization. |
<X-SMP-APNS-ALERT-LOC-ARGS> | Variable string values to appear in place of the format specifiers in loc-key. |
<X-SMP-APNS-ALERT-LAUNCH-IMAGE> | File name of an image file in the application bundle. It
may include the extension. Used as the launch image when you
tap the action button or move the action slider. If this
property is not specified, the system uses on of the following:
|
<X-SMP-APNS-BADGE> | Number that appears as the badge on the application icon. |
<X-SMP-APNS-SOUND> | Name of the sound file in the application bundle. |
<X-SMP-APNS-DATA> | Custom payload data values. These values must use the JSON-structured and primitive types, such as dictionary (object), array, string, number, and Boolean. |
For additional information about APNS headers, see the Apple Web site: http://developer.apple.com/library/mac/#documentation/NetworkingInternet/Conceptual/RemoteNotificationsPG/ApplePushService/ApplePushService.html.
Use these GCM-specific HTTP headers to send GCM notifications:
Header Structure (SAP Mobile Platform and later) | Consists of |
---|---|
<X-SMP-GCM-COLLAPSEKEY > | An arbitrary string (such as "Updates Available") that
collapses a group of like messages when the device is
offline, so that only the last message is sent to the
client. Note: If you do not include this header, the
default value "Updates Available, is used
|
<X-SMP-GCM-DATA> | Payload data, expressed as parameters prefixed with data and suffixed as the key. |
<X-SMP-GCM-DELAYWHILEIDLE> | (Optional) Represented as 1 or true for true, any other value for false, which is the default value. |
<X-SMP-GCM-TIMETOLIVE> | Time (in seconds) that the message remains available on GCM storage if the device is offline. |
For additional information about GCM headers, see the Android Web site: http://developer.android.com/guide/google/gcm/gcm.html#send-msg.
Use the BlackBerry-specific HTTP header to send BES/BIS notifications:
<x-sup-rim-data> or <X-SMP-RIM-DATA>
Use these HTTP headers to send Windows 8 desktop and tablet application notifications:
Header Structure (SAP Mobile Platform and later) | Consists of |
---|---|
<X-SMP-WNS-DATA> | Send payload data to the device as raw notification. Payload data may also be a binary data encoded as a Base64-encoded string. Size should not exceed 5KB. |
<X-SMP-WNS-ALERT> | Text string of the notification, as Tile and Toast notifications. |
<X-SMP-WNS-BADGE> | Number that appears as the badge on the application icon. |
Use these Windows Phone-specific HTTP headers to send MPNS notifications:
Request Header Structure | Consists of |
---|---|
<X-SMP-MPNS-DATA> | Send payload data to device as raw notification. Payload data may also be a binary data encoded as a Base64-encoded string. String length should not exceed more than 2900 characters. |
<X-SMP-MPNS-ALERT> | Text string of the notification, as Tile and Toast notifications. |
<X-SMP-MPNS-BADGE> | Number that appears as the badge on the application icon. |