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
Contributor
Posts: 29
Registered: ‎09-05-2012
My Device: BlackBerry Q10 Z10
My Carrier: China Mobile
Accepted Solution

Where's the best place of "Application scope only once per app start initiation" coded?

Dear All,

 

Do you have any suggestions on where should we put the application scope initiation code?

 

These code should only be invoked the first time user enter the app, but not each time when navigate to a new page.

 

I am using bbUI and currently tried to put it in the webworksready listener in my index.html

 

Is it supposed to be invoke only once or will be invoked each time when I refresh the screen using bb.pushScreen?

 

I notice it was triggerred multiple times, so that's not what I would like to achieve.

 

Any other event listener could I use to put my "Application scope only once per start initiation" ?

 

Appreciate for any suggestion or comment.

Contributor
Posts: 29
Registered: ‎09-05-2012
My Device: BlackBerry Q10 Z10
My Carrier: China Mobile

Re: Where's the best place of "Application scope only once per app start initiation" coded?

This happens actually because of the bug of ripple, that webworks ready callback was triggerred twice.

 

So ideally this will not be an issue.