Developer Tips & Tricks

  1. Status Query - Use a status query request to query the status of a submitted push request. The status of a submitted push request can be queried within 24 hours of the initial push request being made.   

     

  2. Encrypt data – BlackBerry Push API doesn’t encrypt payload data. If security of pushed data is important, encrypt the pay load data before it is sent to the BlackBerry Infrastructure.

     

  3. Payload size limitation – When making a push request it should be taken into consideration that payload data size is limited to a maximum of 8KB per push request. If you require more than 8KB of data to be pushed to your application you can split the data among subsequent requests.

     

  4. Control push request expiry time – The deliver-before-timestamp parameter in a push request can be used to set the expiry time for a push request. If the data cannot be delivered to a device by the timestamp it is simply discarded.

     

  5. Listening for data on the correct port – If your application is unable to receive pushes the most common cause for this problem is your application is listening for pushes on an incorrect port. BlackBerry Push API assigns a unique port to every registered application. This is provided to the developer during the registration process. Your application should only listen for pushes on the port assigned to you.

     

  6. Content Provider Registration – To keep track of the BlackBerry smartphones registered with your push service implement a registration mechanism in your client application that after registering with the BlackBerry Infrastructure, also registers with your server application.

     

  7. Choosing the right quality of service level – BlackBerry Push API supports variety of quality of service levels depending on your application requirements. Using the quality-of-service element in the push request you can specify delivery methods – confirmed, unconfirmed, preferconfirmed and notspecified. If your application requires data reliability then use the confirmed delivery method that provides application level acknowledgement. Delivery methods other than confirmed only provide transport level acknowledgement. Optionally you can also specify a notification response URL using the ppg-notify-requested-to parameter in the push request which is used by the BlackBerry Infrastructure to notify your server when a push request is successfully delivered. Please note that the notification URL needs to be whitelisted by RIM before it can be used for notification purposes.