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: 4
Registered: ‎07-07-2011
My Device: Developer
My Carrier: Various

Strange behavior of Webwork application with background start page.

Hi,
We are developing a BlackBerry webwork application and are facing some problem with background start page that will listen to push notifications.
The problem statement is as follows:

 

  1. Two different pages are set as foreground and background start pages.
  2. After installation or start of device the background start page starts and could be seen as running application.
  3. When the application is started by clicking the icon on home screen it starts another process, that could be seen as another in list of running applications.
  4. We can quit this newly started application by pressing the back button while it is active.
  5. When the application is started again by clicking the icon on home screen it opens the foreground start page on the already running background process. This could be seen as only one application in running application list.
  6. This application could not be closed by pressing the back button while it is active, it can only be put into background by pressing the ‘call end’ button.

If I set same page for foreground and background start pages then behavior is same until step 5, but it could be closed always.

 

BlackBerry OS : 6.0

Device: 9800, Torch

Config.xml info:  Besides foreground and background start pages, two options are checked “Run automatically on install and device startup” and “Allow parameters from a command line invoke”

 

What I got from forums that when icon on home screen is clicked it should start the foreground page in the already running background process and put it into foreground. It does the same but except the first time run. I am unable to find proper documentation that could throw some light on this issue. 

 

It would be great if you could explain what is the intended behavior here and if this is some kind of known bug how to have a workaround.

 

Regards,

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

Re: Strange behavior of Webwork application with background start page.

The two icons in your application switcher are actually an illusion of two processes running.. there is only ever one process running.  This is a bug where the two icons show up when an application runs on startup and then you click on it's home screen icon.

 

I had thought this bug was fixed in the latest v2.1 SDK, but it appears to have missed the release train.  You should subscribe to the following thread, because one of our developers has found a solution to the problem Friday afternoon and we'll be posting a solution to the problem early next week

 

http://supportforums.blackberry.com/t5/Web-and-WebWorks-Development/2-icons-appears-requestBackgroun...

 

I'm pretty sure that it "appears" that it is not closing because of the two icons in the switcher problem.

 

Also if you are using push, I would HIGHLY recomment using our new Push APIs in the v2.1 SDK.  There were issues with the previous push API where if two applications opened push ports, or if you opened two push ports in your application you could see around 90% CPU usage.

 

This has been addressed in the new Push API and it also ensures that you can only open up one push port per application to follow OS guidelines.

 

The old Push API has been marked as depricated.  It is still supported in v2.1 but it will be removed in a later release of the SDK.

 

http://www.blackberry.com/developers/docs/webworks/api/blackberry.push.html 

 

 

 

Tim Neil
Director, Application Platform & Tools Product Management
Follow me on Twitter