01-16-2012 12:10 PM
Hey all,
I've ported some of the sample-push-enabled-app code into our own application, at the moment just for registering against our push server and receiving some messages. If using the sample-push app binaries provided in the SDK I'm able to register and receive push messages without problems with the same details.
If I install our application and perform a register operation (code is pretty much identical to sample app), this works, no exceptions are thrown, but looking at the server (debug_portal example in apache), using 'Query Status in PPG' & our subscriber ID, we see the following details:
| Subscriber Id | Application Id | Address | Status in SDK | Status in PPG |
| xxxx | xxx | 276f859a | ACTIVE | UNSUBSCRIBED |
If I attempt to send a push anyway it gives a '2000' error code: No Active Subscribers for the Push Service. When I register using the sample application this 'Status in PPG' is set to SUBSCRIBED, and push messages are able to send through without problems.
So.. how does one get the PPG status to SUBSCRIBED?
James
P.S. Both applications are installed, but I perform an un-register in the sample app before registering in our app, could this cause a conflict maybe?
01-16-2012 08:10 PM
Keep in mind there are two registrations/subscriptions happening. One is with your server-side application and one is with BlackBerry push server. The subscription with your server-side application is proprietary and up to you. The subscription with BlackBerrry push server you use the net.rim.push.api package - there is an API to 'register' that will register you with BlackBerry push server and setup a listener on your port. The sample push enabled application that ships with the SDK demonstrates both subscriptions so make sure you are doing both.
Also keep in mind doing an unregister will unsubscribe you from both spots so you won't be able to push.
01-17-2012 05:33 AM
Great, thanks!
I hadn't realised that there were two registration points, is this the PPG registration stuff:
PushApplicationRegistry.registerApplication( pad );
From PushLib50.register in the sample code? I need to check that's hooked in and being called if so.
James
01-22-2012 08:24 AM
Yes