By RRZEicons (Own work) [CC-BY-SA-3.0 (http://creativecommons.org/licenses/by-sa/3.0)], via Wikimedia Commons
With Beta 4 of the BlackBerry 10 developer tools on the horizon, there is one important change that anyone using Push should be made aware of. As of the next software update to the BlackBerry 10 Dev Alpha devices, Push will stop working unless two things are completed:
1) Manually add the following action entry to the bar-descriptor.xml file:
2) Request this permission be added to your existing code signing keys. Read on to learn more about how to ensure the permissions are added.
Push holds quite a bit of power in BlackBerry 10; it is able to launch your applications to the background without the users’ action. This process is necessary to allow data to be received and processed by your application as soon as it is available, as well as to alert the user when it arrives. However, there is some responsibility that comes with this ability — namely the responsibility of the application to handle the push in an efficient manner.
Getting Push Rights Added to Your Existing Keys
Anyone signed up already with BlackBerry Push Services will receive an email to their registered email address requesting their signature key information in the coming week. After replying to this email with the requested information, your code signing keys will have the permission applied within a few business days.
Symptoms of not having permission to use Push
The first thing an application that employs Push will try to do is create a PushService object; if you do not have the <permission> element mentioned above added to your application and/or you do not have the push rights added to your code signing key account, then you will receive an error similar to this output to the console when running the application:
/pps/services/push/ipc open failure: 13 Push pps file is not open.
This is easy enough to catch when testing your application. Push notwithstanding, it is always important to test the exact BAR file you are submitting to BlackBerry World prior to doing so. You could test your unsigned application using a Debug Token that has been granted push rights, but then sign accidentally using a RIM Developer Key that does not.
(Note that the same rights will always exist between PBDT and RDK key pairs; for the above scenario to occur, the developer would need to use 2 separate sets of keys.)
Existing Applications (BlackBerry World)
If you have an application which has been submitted to BlackBerry World that uses push services, then you will need to request that push rights be added to your code signing keys, sign a new version of your application, then submit the new version. There is still plenty of time to do this before BlackBerry 10 launch, but it should be done as soon as possible to leave time for testing and approvals.
When a debug token is created, it receives the set of rights associated with your code signing account at the time the token is created. This means that if your debug token was created before you had push rights added to your account, then the debug token will not have push rights. The easy fix is to generate a new debug token after push rights have been applied, and the newly-created token will then have the push rights needed for your application if the permission was applied to your account.
For more information:
General bar-descriptor information