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

BlackBerry Push Development

Reply
New Contributor
amitbb
Posts: 4
Registered: ‎04-20-2010
My Device: BlackBerry 9000

Content Provider URL ?

Hi All,

I have registered for BB push service. and got back registration mail with details. Now I am able to run server sample-app and debug portal provided in BPSS. also installed Push API client  Sample app on my device.  But I am unable to register my app from device. It give me following error when I try to register.

Error:

Content Provider network command [Subscribe] failed, caused by could not connect to xxxxxx

command 'register' failed with error: java.io.IOException: Network operation [Subscribe] failed. Make sure that Content Provider URL is accessible.

 

In settings, what should I set Content Provider URL ?? I tried with various options https://localhost:8443/sample-app, with my ip ip address but was not able to register device app successfully.

Port and App Id is the one I got in the registration email. BPAS URL is https://pushapi.eval.blackberry.com

 

username = app id, provided in the registration email.

password = password,  provided in the registration email.

 

Your help is appreciated. Thanks in advance.

Cheers,

Amit 

Please use plain text.
Developer
Bullety
Posts: 138
Registered: ‎08-02-2009
My Device: Z10

Re: Content Provider URL ?

Where did you install the sample-client app?

 

On the simulator or on your device?

 

If on the simulator, did you have the mds simulator running in the background?

 

If you used your real device, this cannot work because localhost points to your localhost - this means it was searching the server application on your BlackBerry device.

Please use plain text.
New Contributor
amitbb
Posts: 4
Registered: ‎04-20-2010
My Device: BlackBerry 9000

Re: Content Provider URL ?

 

Thanks Bullety,  for pointing me to the right direction.
I finally managed to resolve the content provider url part. I had installed the sample-client app on my real device and then pointed the content provider url to my application dns. e.g https://www.xyz.com/myAppContext
then when I subscribed from my device sample app, the subscribe request became
At server side my application's subscribe servlet parsed the request and sent http response (rc=200) back to the device. 
Once you get response from Content provider(in this case my server application) the device sends subscription request to blackberry infrastructure URL. 
again you get back a http response: rc=200 from the BB server. and your sample app registers successfully and starts listening  to push messages. :smileyhappy:

Thanks Bullety,  for pointing me to the right direction.
I finally managed to resolve the content provider url part. I had installed the sample-client app on my real device and then pointed the content provider url to my application dns. e.g https://www.xyz.com/myAppContextthen when I subscribed from my device sample app, the subscribe request became
https://www.xyz.com/myAppContext/subscribe?username=xxx-xxxxxxxxxx&password=xxxxxv&appid=xxx-xxxxxxx... public
At server side my application's subscribe servlet parsed the request and sent http response (rc=200) back to the device. Once you get response from Content provider(in this case my server application) the device sends subscription request to blackberry infrastructure URL. https://pushapi.eval.blackberry.com/mss/PD_subReg?serviceid=xxx-xxxxxxxxx&osversion=4.6.0.247&model=... public
again you get back a http response: rc=200 from the BB server. and your sample app registers successfully and starts listening  to push messages. :smileyhappy:

 

Please use plain text.
New Developer
pramilathakur
Posts: 34
Registered: ‎05-17-2010
My Device: 9700 bold

Re: Content Provider URL ?

Hi everyone,

 

I am facing the same problem.

I have uploaded the sample app client on my simulator and the MDS server running on background.

 

Now when I want to register the sample app, it asks for userid and password.

I am not sure which userid and pass it is required.

 

Can someone point me in the right direction please? I know I am missing some configuration.

 

My MDS is running on port 8080

My content provider on 8082

 

--thanks,

--Pramila

Please use plain text.
Regular Contributor
mdicesare
Posts: 78
Registered: ‎04-28-2010
My Device: BlackBerry 10 Dev Alpha

Re: Content Provider URL ?

If you are using the sample app from the Push Service SDK you can choose any username and password - by default it's configured to allow anything. When you develop your real push application you'll want to validate the username and password in your server-side application against a list of your users.

Please use plain text.
New Developer
pramilathakur
Posts: 34
Registered: ‎05-17-2010
My Device: 9700 bold

Re: Content Provider URL ?

I still get the error. This is the Error

 

Executing command 'register' ...

Opening URL: http://localhost:8082/debug-portal-l .0.05//

subscribe?username=pramila&password=pramilaStappid=647

2867994&address=2100000a&osversion=5.0.0.535&model=9

5506.fieldl=202;deviceside=false;ConnectionType=mdspublic

Content Provider network command [Subscribe] failed,

caused by Could not find a service book entry for IPPP

 

 

Command 'register1 failed with error: java.io.IOException:

Network operation [Subscribe] failed. Make sure that

Content Provider URL is accessible.

 

What should be the listening port. Is it 110 (Device Port) or 8080(MDS) or 8082(Content Provider)

 

I have no idea and expecting to learn from some of our pros.

 

--Pramila

Please use plain text.
Regular Contributor
mdicesare
Posts: 78
Registered: ‎04-28-2010
My Device: BlackBerry 10 Dev Alpha

Re: Content Provider URL ?

From the device a content provider URL of http://localhost:8082/debug-portal-1.0.05 will not work. The device doesn't know 'localhost' - you need to specify the IP address of your computer hosting the BlackBerry Push Service SDK Tomcat.

 

Also the device needs to have BIS-B service books. From the error you posted below it looks like your device doesn't have the IPPP service book.

 

The application on your device should use the listening port assigned to you by RIM. When you registered to use push RIM would have sent you an email with your registration details including the port you need to listen on. It would be in the Server section under the Push Port: field.

Please use plain text.
New Developer
pramilathakur
Posts: 34
Registered: ‎05-17-2010
My Device: 9700 bold

Re: Content Provider URL ?

Actually I am using the simulator, not the device

 

I also applied to blackberry to use BES, but still I did not receive anything.

 

I loaded the client app on simulator and trying to connect using the settings.

Port 110 was already there, so I did not change.

 

But from simulator I am able to connect using localhost:8082 to the site

 

Is there any other place like in PushSDK.properties where I need to mention about the Gateway URL?

 

I know I am missing some configuration.

My BES admin wants to load the app, but without testing I cannot give the code.

 

--Thanks,

--Pramila

Please use plain text.
Regular Contributor
mdicesare
Posts: 78
Registered: ‎04-28-2010
My Device: BlackBerry 10 Dev Alpha

Re: Content Provider URL ?

I am not too familiar with the BES push - sorry. I thought you were talking about BIS push.

 

Not 100% sure but I don't believe the client sample application that comes with the Push SDK supports BES push - it specifically looks for the IPPP service book - which is used for BIS push. From what I understand a future version of the SDK will have a client sample app that works with BES.

 

 

Please use plain text.
New Developer
pramilathakur
Posts: 34
Registered: ‎05-17-2010
My Device: 9700 bold

Re: Content Provider URL ?

Thanks for the reply.

 

I was hoping someone who has used the simulator to get back to me.

 

So I have 3 components.

Simulator

Content Provider : at 8082

MDS-CS : Acting as BAPS (at 8080)

 

So I just wanted to know what I am trying to achieve is possible or no.

If yes then what kind of configuration is needed?

Anyone, any help will be very helpful.

 

--Thanks

--Pramila

Please use plain text.