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

Reply
Developer
Posts: 22
Registered: ‎10-30-2009
My Device: Not Specified
Accepted Solution

How to close() an application in run time?

Hi All,

 

I have an application which I want to close();

Below in the senario.

My app checks for the update verison of it using an webservice call and if it finds one then it has to update it.

Basically the app will open the update url in the BB browser.

Now the problem is that I am able to open the url in the browser but I am unble close my current application.

I am using the following code

 

String url = "MyURL";
BrowserSession browserSession = Browser.getDefaultSession();
browserSession.displayPage(url);

browserSession.showBrowser();

 How do I close my application?

 

Thanks for your help in advance.

 

Developer
Posts: 467
Registered: ‎07-16-2009
My Device: Z10 LE
My Carrier: Vodafone NL

Re: How to close() an application in run time?

If there is no resources to free.Call System.exit(0) after browser invoking.

 

Developer
Posts: 212
Registered: ‎07-18-2008
My Device: Storm 9550

Re: How to close() an application in run time?

a bb application will exit when the last screen will be closes (removed from display stack) or system.exit will be caled

If your problem was solved, please mark answer as "Accepted solution"
If your want to thank, click the "kudo" symbol
___________
visit me: http://mobilejavadevelopment.blogspot.com/
visit the Berlin BlackBerry Developer Group: http://berlinblackberrydevelopers.blogspot.com/
Developer
Posts: 22
Registered: ‎10-30-2009
My Device: Not Specified

Re: How to close() an application in run time?

It worked.

 

Thanks a lot. :smileyhappy: