10-04-2011 10:53 AM - edited 10-04-2011 10:57 AM
Hi all!
I'm trying to register my client application for push notifications. I'm using SDK version 5.0 and trying to connect to eval server. However, the registration process always fails with a netowrk error. The error is the same if I try in the simulator or in a real device.
If I try to insert the registration link in the browser:
https://pushapi.eval.blackberry.com/mss/PD_subReg?
I obtain the following message (the service ID is correct, I'm sure):
Error
The content you have requested is not available
PD_subReg command is not currently in service!
What is wrong? Am I missing something or the push eval server is down?
Thanks in advance for the attention.
--
Marco Minerva
10-04-2011 09:52 PM
First off use http not https and you must register from a real device that has BIS browsing.
10-05-2011 03:24 AM
Hi! Thanks for the reply!
The URL https://pushapi.eval.blackberry was sent me in the confirmation mail for the push evaluation request. So is the URL I received incorrect? And there is a way to programmatically check if the device supports BIS browsing?
Thanks again.
--
Marco Minerva
10-05-2011 09:15 PM
I know its not very clear but that is the URL (with https) you need to use to push with but for registration use http instead of https.
I think there are APIs to check if there is an IPPP service book or if the BIS transport is available - don't have code to share though, sorry.
10-06-2011 03:19 AM
Hi!
OK, now it's a bit clearer. The last question. I'm using BlackBerry Push API, so for example I'm invoking the method PushApplicationRegistry.registerApplication. In this method must I use the url with HTTP, right? If this is the case, when is it necessary to use the url with HTTPS? After registration, I automatically receive notification for every received message and status change, or I'm missing something?
Thanks again.
--
Marco Minerva
10-06-2011 04:09 AM
This is an example for using PushApplicationRegistry.registerApplication() method.
int port = <the port you get from confirm email >;
String appId = <the appId you get from confirm email >;
String bpasUrl = "http://pushapi.eval.blackberry.com"; //use "http"
ApplicationDescriptor ad = ApplicationDescriptor.currentApplicationDescriptor
byte serverType = PushApplicationDescriptor.SERVER_TYPE_BPAS;
PushApplicationDescriptor pad = new PushApplicationDescriptor( appId, port, bpasUrl, serverType, ad );
// check whether already registered or registration pending
PushApplicationStatus pushApplicationStatus = PushApplicationRegistry.getStatus( pad );
byte pasStatus = pushApplicationStatus.getStatus();
if( pasStatus == PushApplicationStatus.STATUS_ACTIVE ) {
// we already registered, update the statuses
Debug.log( "Already registered with BPAS" );
return;
} else if( pasStatus == PushApplicationStatus.STATUS_PENDING ) {
// we already scheduled registration, wait for its result
Debug.log( "Registration with BPAS already scheduled");
} else {
// not registered yet, register
Debug.log( "Scheduled registration with BPAS");
PushApplicationRegistry.registerApplication( pad );
}
Maz