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
anin
Posts: 3
Registered: ‎05-29-2011
My Carrier: TIM

How to close my application

Hello! I'm really new to BB app development, so sorry if I say nonsense...

I wrote my first app, a simple launcher for a web site using WebWorks.

I noticed that if I close the application pressing the red button on the telephone, it stays in the background.

So I want to have a button (or a menu option, or something similar) to close the application.

The question is: how do, using JavaScript, to close the application?

 

Thank you in advance for a help!

Anin



Please use plain text.
Developer
praveen_rajan
Posts: 163
Registered: ‎05-06-2011
My Carrier: Not Specified

Re: How to close my application

Hi,

 

To achieve this for PlayBook use the feature element  <feature id="blackberry.app" />  in your configuration document: and call the following function on any button press.

 

function exitApp() {

  blackberry.app.exit();

}

 

Thanks,

Praveen

Please use plain text.
New Contributor
anin
Posts: 3
Registered: ‎05-29-2011
My Carrier: TIM

Re: How to close my application

Thank you for your kind reply!

Unfortunately this works, but only close the browser, and the app is still active with a black screen...

The app is a simple launcher for a web site, and I need a way to close the browser and exit the application.

 

Thanks

anin

 

Please use plain text.
Developer
agungeddy
Posts: 164
Registered: ‎08-26-2010

Re: How to close my application

[ Edited ]

seems there is some misunderstanding,
the javascript given above is not for the browser, but for the application itself.
And it looks ambiguous what's the meaning of the 'browser' you were noticed before.
I suggest better if you explain the method, including the some codes of your launcher application.

Please use plain text.