07-07-2011 11:53 AM
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:
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.
07-09-2011 12:58 PM
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
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.