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
Developer
Posts: 185
Registered: ‎08-17-2008
My Device: Red BlackBerry Z10
My Carrier: Vodafone

New WebWorks 2.1: BIS Push Listener

Please someone can clarify me:

 

- before with SDK 2.0 Open the Port for listen Push for BIS was very fast. And previously we had to register the app with Push

 

- now with new SDK 2.1 Open BISPush Listener is not fast, and seems now is connecting to some place, i am seeing network activity. 

 

So with new SDK 2.1 Open BISPush have we register the app with push? or is not necesary?

 

Thanks in advance

 

Josep Maria
Retired
Posts: 3,708
Registered: ‎10-16-2008
My Device: Z10
My Carrier: Rogers

Re: New WebWorks 2.1: BIS Push Listener

Is the call to openBISPushListener() blocking your JavaScript?  or is it taking some time for the onRegister callback to be invoked?

 

By supplying the data in the Options parameter, it is automatically registering your application with the public BIS push servers so that you no longer need to do the previous manual registration work through AJAX.

Tim Neil
Director, Application Platform & Tools Product Management
Follow me on Twitter
Developer
Posts: 185
Registered: ‎08-17-2008
My Device: Red BlackBerry Z10
My Carrier: Vodafone

Re: New WebWorks 2.1: BIS Push Listener

Sorry Tim,

 

yes i am saying that it taking some time for the onRegister callback.

 

And really now i don't undestand the process, with SDK 2.0,  the user had to Register 1 time to BIS Push manually, and I was autorunning the app, run in background and open the port.

 

Now with SDK 2.1 seems that every time I open the port is registering again with BIS Push service. is it not possible only open the port? and register only 1 time? with separates process?

 

And with WakeUp seems that now i don't need to autorun the app in background. Now allways is listening the device on this port and it's not necessary run the app in background? is this correct?

 

i am losing is this process Smiley Sad 

 

Josep Maria
Retired
Posts: 3,708
Registered: ‎10-16-2008
My Device: Z10
My Carrier: Rogers

Re: New WebWorks 2.1: BIS Push Listener

So to start... Erase the 2.0 way from your thinking Smiley Happy

 

For Push you have some options

 

1) Always run in background and listen for data

 

2) On start-up register and then close your app which will be woken up later

 

The openBISPushListener() does what is required to keep you connected to the BIS service.  In some cases this may mean that it is sending new registration requests back to the server.

Tim Neil
Director, Application Platform & Tools Product Management
Follow me on Twitter
Highlighted
Developer
Posts: 185
Registered: ‎08-17-2008
My Device: Red BlackBerry Z10
My Carrier: Vodafone

Re: New WebWorks 2.1: BIS Push Listener

Thanks again Tim for you explanation.

 

Just another question about wakeUp,

 

when I have the app closed and I receive a new Push my app is autorunning this is correct.

 

But the app is not processing the Push Data received.

 

In "normal" mode (app running onforeground or background) works perfect. The problem only is with wakeUp process. Wakeup is callling the same page index.html.

 

And in this wakeup scenario, if i clicked the icon of the app another instance is opened, and i have commented the code private static void makeDebugArgs( String[] args, WidgetConfigImpl wConfig )

 

Thanks in advance

 

Best regards

 

Josep Maria