So i register my App with BlackBerry and i could receive push msgs but after a certain time around (3 hr) i try to push to the device again but no luck, then i have to register again with BlackBerry so i could receive pushes.
what is the time that i need to be regist开发者_Go百科er again and is that related that i have a development credentials not a production one ?
Registration should be persistent. But RIM's servers are sometimes flaky: are you seeing this happen consistently?
Are you using OS 5.0.0 or earlier? If it's the older OS versions, you need to make sure your listening thread is always running. For 5.0.0 and above, the OS takes care of this for you.
Another thought relates to confirmed delivery and application acknowledgment. If you are using this level of service (available for either Push Plus or Push Essentials), but your application is not acknowledging the notification, RIM may mark your device as suspended and won't send it any further notifications.
The default is to use the UNCONFIRMED delivery method. If you're using RIM's server-side SDK in Java, and you have code like this:
pushMessageControl.getQualityOfService().setDeliveryMethod(DeliveryMethod.CONFIRMED);
Or if you're not using their SDK, but have the following in your push request XML:
<quality-of-service delivery-method="confirmed"/>
Then you need to call the following in your BlackBerry app in the notification handler:
pushInputStream.accept();
The pushdemo
sample device application that is part of the Push SDK supports optional application acknowledgment, so you should study that code to see what to do.
精彩评论