Welcome!

Welcome to the official BlackBerry Support Community Forums.

This is your resource to discuss support topics with your peers, and learn from each other.

inside custom component

Java Development

Reply
Developer
Posts: 571
Registered: ‎04-11-2009
My Device: BB 10 Dev Alpha

Registering for BIS + PPG Base URL+REASON_INVALID_PARAMETERS

 

Hi,

 

When I try to Register my app with Push using http://supportforums.blackberry.com/t5/BlackBerry-Push-Development/Simplified-BIS-Push-client-sample.... Its done in nice manner.

 

But, I want to know the use of following. Where this PPG Base URL will be used.

 

Configuration properties for the push-enabled application (client application)

 

Application Credentials (for use in your client application):

 

Application ID:

XXXX-XXXXXXXXXXXXXXXXXX

 

PPG Base URL**

http://cpXXX.pushapi.eval.blackberry.com

 

Push Port:

12345

 

If I try to register my app with following approach :

 

NOTE : 

private static String PUSH_SERVER_URL = "http://cpXXX.pushapi.eval.blackberry.com";
//// I replaced XXX here with my 4 digit CPID 

 

MyApp extends UiApplication implements PushApplication {
MMPushDemoAppMain(){
private static String PUSH_SERVER_URL = "http://cpXXXX.pushapi.eval.blackberry.com";
private static final String appId = "XXXX-XXXXXXXXXXXXXXXXXX";
private static final int port = 12345;
byte serverType = PushApplicationDescriptor.SERVER_TYPE_BPAS;
ApplicationDescriptor ad = ApplicationDescriptor.currentApplicationDescriptor();
PushApplicationDescriptor pad = new PushApplicationDescriptor(appId, port, PUSH_SERVER_URL, serverType, ad);
PushApplicationRegistry.registerApplication(pad);
}
public void onMessage(PushInputStream inputStream,
StreamConnection conn) {
System.out.println(" -------onMessage---------------");
}
public void onStatusChange(PushApplicationStatus status){
System.out.println(" --------------- onStatusChange -----------------------");
System.out.println(" status = " +status.getStatus());
}
}

 

Please explain..

 

 


It gives me  - REASON_INVALID_PARAMETERS.

Regards,
Kanak Sony
------------------------------------------------------------------------------------------
http://dodevelopnshare.wordpress.com/ | http://www.linkedin.com/profile/view?id=188131481&trk=tab_pro
Developer
Posts: 179
Registered: ‎06-15-2011
My Device: Storm 9550
My Carrier: Vodaphone

Re: Registering for BIS + PPG Base URL+REASON_INVALID_PARAMETERS

In my case the PPG url is:
http://pushapi.eval.blackberry.com
Testing Simon's code needs a different server. It won't work with SDK server. The server in SDK includes client registration with push initiator and BB push server while Simon's code includes registration with BB push server only.