PushPayload
The PushPayload object provides access to the payload that has arrived as the result of a push.
This object cannot be created by the new keyword. It is generated only by the system on receipt of a push notification.
Learning Resources:
| Sample - Push Capture Sample that demonstrates how to use the BlackBerry Push API [BlackBerry on GitHub]. |
| Developer Guide Guide for creating a Push Capture sample app [BlackBerry Developer Documentation]. |
Supported Platform(s)
| - BlackBerry 10 |
| API | BB5.0 | BB6.0 | BB7.0 | PB1.0 | PB2.0 | BB10 | Ripple |
|---|---|---|---|---|---|---|---|
| acknowledge | Y | ||||||
| data | Y | ||||||
| headers | Y | ||||||
| id | Y | ||||||
| isAcknowledgeRequired | Y |
Configuration Document Settings
|
To use all of the API described for this object, you must ensure the following settings are in your configuration document: |
|
You must declare the feature element(s) below in your configuration document: |
| Feature ID | BB5.0 | BB6.0 | BB7.0 | PB1.0 | PB2.0 | BB10 | Ripple |
|---|---|---|---|---|---|---|---|
| <feature id="blackberry.push" /> | Y |
| Permission Elements (PlayBook and BlackBerry 10+) |
|---|
| You must declare the permission element(s) below in your configuration document: |
|
- <rim:permit system = 'true'>_sys_use_consumer_push</rim:permit>
Permits your consumer (public) application to use push. This permission is not needed to use enterprise push. |
Functions
| void | acknowledge |
Properties
| Blob | data |
| Object | headers |
| String | id |
| Boolean | isAcknowledgeRequired |
Functions
void
acknowledge
(shouldAcceptPush : Boolean)
Sends an acknowledgement to the PPG indicating whether a push should be accepted or rejected. It is up to the application to determine whether to accept or reject a push message based on it own business rules. It is strongly recommended to accept or reject the push message as soon as possible otherwise the push message will automatically be considered rejected.
Use the isAckRequired property to determine whether or not calling acknowledge is required.
| Supported Platforms | |
|---|---|
| - BlackBerry 10 | |
| Parameters | |
|---|---|
| shouldAcceptPush | True if the push should be accepted; false if the push should be rejected |
Code Example:
|
Properties
readonly
Blob
data
The data (payload) of a push.
| Supported Platforms | |
|---|---|
| - BlackBerry 10 | |
Code Example:
|