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

New Developer
Posts: 77
Registered: ‎09-02-2010
My Device: torch
My Carrier: blackberry developer

Close the app running in background

Hi All


Through my operations, I am running my application in Background. Since user doesn't know whether app running in background, may launch it again. In this process, i want to close the app running background and start it freshly. May this idea is wrong due to lack of information. Following are concerns


1. when user click the app icon on home page, does it activate the app which is already running in background ?

if so, I don't want this. I need to start the app freshly. Please let me know the possible procedures.


2. if it activates, wheere we thrown to background, from there it starts I guess. which is not required. I want to make it run from first page as fresh application.


3. To follow this, I need to close the app running in background and start the same with fresh values. Because my app constants should get default values.


Sorry! If I am wrong. Please let me know the clear information.



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

Re: Close the app running in background

If the app running in the Background was started from the icon and just put in the Background, then when the user clicks on the icon, the app is bought from the background to the foreground  But if this is the case, and you want the app to start 'freshly', why do you allow the app to go to the background in the first place?


The Application deactivate method is called when the app is put in the background. Perhaps you want to shut the app down at this point?


That said, the process you are going through seems a bit odd.  If I put something to the background (for example to take a call), then I expect the same screen to be there when I go back to the application.  So I'm  wondering if you are designing this the best way.  But I don't know what you are actually trying to do or why, so I really can't comment on that.