Oracle Help Center | Oracle Push Cloud Service (Standalone) title

Android (GCM)

Each push notification includes a payload. The payload contains information about how the system should alert the user, as well as any custom data you provide.

Push IO allows you to send data to your app using JSON key pairs. These pairs are contained within the payload parameter in your POST command (see the Server API topic for details on sending via RESTful API).


NOTE: The maximum payload size for a GCM notification is 4kb. Google Cloud Messaging refuses any notification that exceeds this limit. Push IO also reserves a portion of this payload for engagement tracking and other mandatory metrics. Furthermore, each platform supports slightly different sets of features. For instance, Android does not have a badge parameter, while iOS does.



Parameter Description
"alert" The value of the data.alert field that is shown as the notification text on Android by the Push IO client library.
"alert" : "Welcome to Push IO!"
"sound" The value of the data.sound field that is sent to Android devices. Sound files should be located in the /res/raw folder of your project. Furthermore, unlike iOS, the filetype (.wav, .caf, etc.) should NOT be included in the payload. For example:
"sound" : "rooster"
"extra" GCM-specific key/value pairs (provided in JSON) that are passed as children of the 'data' element of the payload. If any value is provided for this it will override the entire payload-level extra values; i.e. it is not merged with the extra data in the parent platform object.
"url" : ""
"collapse_key" The GCM collapse key, used for Send-to-Sync messages
Described in the Google Cloud Messaging:Messaging Concepts and Options guide topic, Collapsible and non-collapsible messages
"delay_while_idle" Boolean value, default false, which GCM servers use to determine if the message will be delivered immediately or when the device becomes active.
"time_to_live" Integer value determining how long (in seconds) the message should be kept for delay_while_idle situations, default is 4 weeks.

Example GCM Payload:

"alert":"Your Message",

More information on GCM payloads can be found on the Google Cloud Messaging site for Android developers.