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

Web and WebWorks Development

Reply
New Contributor
Posts: 3
Registered: ‎05-24-2012
My Device: Developer

WebWorks/PhoneGap invoke openBISPushListener, but no "onRegister" callback

I'm working on a sample application (in a simulator) to connect a WebWorks/PhoneGap application to Urban Airship.  I've followed the sample here to invoke the "openBISPushListener" API.  However, I never receive the "onRegister" callback.  If I invoke "openBISPushListener" a second time, I receive:  "The registration is already initiated for your application.  Check the current status."  If I invoke "closePushListener" with the appropriate port, I can then invoke "openBISPushListener" without error (but again, with no "onRegister" callback).

 

How do I check the "current status"?

 

Where should I start looking to troubleshoot the lack of "onRegister" callback?

 

Thanks,

--David

 

BlackBerry Development Advisor
Posts: 835
Registered: ‎07-15-2008
My Device: Passport
My Carrier: Bell

Re: WebWorks/PhoneGap invoke openBISPushListener, but no "onRegister" callback

Have you signed up for an account and read the documentation here: https://bdsc.webapps.blackberry.com/devzone/services/push

 

There's a fair bit more to the Push Service than the WebWorks APIs.

Tim Windsor
Open Source Technical Lead
New Contributor
Posts: 3
Registered: ‎05-24-2012
My Device: Developer

Re: WebWorks/PhoneGap invoke openBISPushListener, but no "onRegister" callback

I signed up well over a week ago and received the response email containing the AppID, URLs, port, etc.

 

I've shelved my WebWorks R&D and simply tried to follow the directions here.  Everything is successful down to "Configure the sample push-enabled application" step 8.  At that point, I get "Command 'register' failed with error:  java.io.IOException:  Network operation [Subscribe] failed.  Make sure that Content Provider URL is accessible.".  I know it's accessible because I can hit the Content Provider URL from the browser on the device.  One caveat with the browser on the device:  I have to accept the security certificate because it's self signed.

 

Anyway, all this seems somewhat moot because I'd like to use Urban Airship as the Push Initiator.  I suspect this is closer to what I need to do, but it looks like it's not using the APIs documented here.

 

--David

New Contributor
Posts: 3
Registered: ‎05-24-2012
My Device: Developer

Re: WebWorks/PhoneGap invoke openBISPushListener, but no "onRegister" callback

I'm trying to develop & test on a Blackberry Torch 9860 device.  Must it have a SIM card/carrier/contract before any of this will work?

BlackBerry Development Advisor
Posts: 835
Registered: ‎07-15-2008
My Device: Passport
My Carrier: Bell

Re: WebWorks/PhoneGap invoke openBISPushListener, but no "onRegister" callback

BIS Push requires a BIS service plan. You might be able to get a short term pay-as-you-go plan that includes it, and still use Wifi for the actual transportation.

Tim Windsor
Open Source Technical Lead
New Contributor
Posts: 2
Registered: ‎05-31-2012
My Device: Bold 9790
My Carrier: 6478301600

Re: WebWorks/PhoneGap invoke openBISPushListener, but no "onRegister" callback

Hi Tim,

 

I am having the same problem. I am using WebWorks with Urban Airship being the push initiator. I am using push service evaluation credentials in my application. Seems like the "onRegister" and "onData" call backs are not being called at all even though it seems like there are some activities as I can see the data inidicator on the top right corner. 

 

From your reply what I can understand is to test this I would require a BIS service. With a BIS enabled SIM, the "onRegister" call back will only work cause it will be able to register to the push service via proper meduim. 

 

Could you please confirm?

 

Regards,

mmohiudd

 

 

 

 

BlackBerry Development Advisor
Posts: 835
Registered: ‎07-15-2008
My Device: Passport
My Carrier: Bell

Re: WebWorks/PhoneGap invoke openBISPushListener, but no "onRegister" callback

Yes, you will need a BIS enabled SIM in order to make BIS Push work. 

Tim Windsor
Open Source Technical Lead
New Contributor
Posts: 4
Registered: ‎06-05-2012
My Device: Torch 9800 - Developer
My Carrier: iWireless - Developer

Re: WebWorks/PhoneGap invoke openBISPushListener, but no "onRegister" callback

I was having this exact same issue last week, and found the info about BIS provider.   I ran over to a prepaid place and got them to set me up with a cheapo prepaid blackberry plan, and once everything was set up I was able to get push stuff to work in webworks.