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.
To use this API in your project, add the push plugin:
webworks plugin add com.blackberry.push
As of BlackBerry 10 WebWorks SDK 2.1, there is a change in behavior when you add this plugin. Previously, when you added the com.blackberry.push plugin to your project, the tools automatically added the _sys_use_consumer_push permission. However, automatically adding this permission caused problems for enterprise push applications. As a result, the permission is no longer automatically added. If you want to access consumer push functionality, you must now explicitly add this permission by either using the SDK web tool or manually editing the config.xml file.
Sample - Push Capture Sample that demonstrates how to use the BlackBerry Push API [BlackBerry on GitHub].
Developer Guide for creating a Push Capture sample app [BlackBerry Developer Documentation].
|Function Type||Function Name|
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.
- Type: Boolean
True if the push should be accepted; false if the push should be rejected.
The data (payload) of a push.
The headers of a push in string header name-header value pairs
The ID of a push.
Indicates whether or not a developer must acknowledge the receipt of a push. True if an acknowledgement is required for the push; false otherwise.
Last modified: 2014-11-07