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

Java Development


Thank you for visiting the BlackBerry Support Community Forums.

BlackBerry will be closing the BlackBerry Support Community Forums Device Forums on April 1st (Developers, see below)

BlackBerry remains committed to providing excellent customer support to our customers. We are delighted to direct you to the CrackBerry Forums, a well-established and thorough support channel, for continued BlackBerry support. Please visit http://forums.crackberry.com or http://crackberry.com/ask. You can also continue to visit BlackBerry Support or the BlackBerry Knowledge Base for official support options available for your BlackBerry Smartphone.

"When we launched CrackBerry.com 10 years ago, we set out to make it a fun and useful destination where BlackBerry Smartphone owners could share their excitement and learn to unleash the full potential of their BlackBerry. A decade later, the CrackBerry community is as active and passionate as ever and I know our knowledgeable members and volunteers will be excited to welcome and assist more BlackBerry owners with their questions."

- Kevin Michaluk, Founder, CrackBerry.com

Developers, for more information about the BlackBerry Developer Community please review Join the Conversation on the BlackBerry Developer Community Forums found on Inside BlackBerry.


Reply
New Developer
Posts: 49
Registered: ‎07-16-2008
My Device: Not Specified
Accepted Solution

Bringing an application from background to foreground.

Hi,

I want to push my application in background and if the user again try to open the application it should come to the foreground. I have used "UiApplication.getUiApplication().requestBackground();" to send my application in the background.

If I select the application again it is starting but i need to satisfy some condition before it come to foreground. I have reffered this thread "http://supportforums.blackberry.com/rim/board/message?board.id=java_dev&message.id=363" but not finding any method which is going to fire when the application going to come in foreground. Pls give me some idea to solve it.

Thanks.

Developer
Posts: 5,339
Registered: ‎09-20-2008
My Device: ***
My Carrier: ***

Re: Bringing an application from background to foreground.

Highlighted
Developer
Posts: 19,636
Registered: ‎07-14-2008
My Device: Not Specified

Re: Bringing an application from background to foreground.

You say "i need to satisfy some condition before it come to foreground".

 

Before the UiApplication comes to the foreground, it runs the UiApplication.activate() method.  You can put some checks in this code, and do a UiApplication.requestBackground(), if you are not ready to come to the foreground.  You might want to pop a dialog up for the user to let them know why the app won't come to the foreground.  If so, you should use a method like that in the following KB article:

 

How To - Alert a user from a Background application
Article Number: DB-00407
http://www.blackberry.com/knowledgecenterpublic/livelink.exe/fetch/2000/348583/800332/800505/800608/...

 

 

New Developer
Posts: 49
Registered: ‎07-16-2008
My Device: Not Specified

Re: Bringing an application from background to foreground.

Thank you so much for clearing the clouds.   :-)