Question

I am Java Developer but recently I got some project related to BlackBerry Push Service implementation. My objective is to write the server side implementation for the Push Initiator i.e. the content provider. but to test this I need to use some sample push enabled app also.

I have gone through the BB Developers guide and have done below steps:

  1. Registered for BB Push service evaluation API and received the confirmation mail with all the required details like: appId, pwd, PPG Url for BIS, port number etc.

  2. installed the BB Push installer for low-level-Push-Imitator(i.e. the web app content provider) and the sample push enabled app(PushDemo_sample available on BB Push service Developers guide).

Now I am testing this push-enabled app on simulator and trying to register. But as the sample app tries to first subscribe with the Push-Initiator(CP) before registering with BB Push server. I have commented the below code as I don't want the subscription part. The RegisterCommand class handles the subscription and registration.

protected void execute() throws Exception {
        // first we register with Content Provider
        Logger.log("Reached RegidterCommand execute() method .. but eacapingCMD_SUBSCRIBE");
        //ContentProviderProtocol.performCommand( ContentProviderProtocol.CMD_SUBSCRIBE, username, password, isEnterprise, tx ); // commented
        // if the registration is successful we register with BPS
        Logger.log("Now Going to register with PPG");
        BpasProtocol bpasProtocol = PushLibFactory.getBpasProtocol();
        bpasProtocol.register( tx, isEnterprise );
        // update the registered state
        PersistentStorage.setRegistered( true );
    }

But after configuring the app with the proper appId, PortNumber and BPS server URL, dummy push initiator application url, When I clicked on register, It is showing some IOException:

Command 'register' failed with error: java.io.IOException: could not find a service book entry for IPPP.

In the app logs on simulator I can see that it is trying to open the BB Push eval url with some parameters appended after the url like below:

Opening URL: http://cpXXXX.pushapi.eval.blackberry.com/mss/PD_subReg?serviceid=XXXX-sxxxxxxxxxxxxxxxxxxxxxxxxxxxx&osversion=7.1.0.318&model=9900&deviceside=false&ConectionType=mds-public

Here I am just trying to register my simulator with the BB Push server. Is it not possible to test the Push service on simulator? or I am doing anything wrong?

and one more doubt how the register() method of PushLib50 class of the sample push app is appending the extra parameters after the eval URL?

Please help. Point out if I am doing anything wrong to implement the push service.

Was it helpful?

Solution

You cant test push notification in simulator. you need real device for that. Refer this site

The BlackBerry Push Service is an essential component of the real-time, always-on experience of BlackBerry smartphones. It offers an efficient and reliable way of sending information to your users. It also lets your application process information in the background and notify users when their attention is required.

Licensed under: CC-BY-SA with attribution
Not affiliated with StackOverflow
scroll top