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

Native Development

New Developer
Posts: 24
Registered: ‎02-19-2013
My Device: Simulator
My Carrier: Simulator

How to exit/finish and application


How can we exit an application?

On application start, I want to show a System dialog for the user to accept the conditions.

Now if user declines it, how can I stop the application.

It should be something similar to stopself / finish activity on Android platform.

Posts: 571
Registered: ‎04-11-2009
My Device: BB 10 Dev Alpha

Re: How to exit/finish and application

Kanak Sony
http://dodevelopnshare.wordpress.com/ | http://www.linkedin.com/profile/view?id=188131481&trk=tab_pro
BlackBerry Development Advisor
Posts: 15,727
Registered: ‎07-09-2008
My Device: BlackBerry PRIV
My Carrier: Bell

Re: How to exit/finish and application

Unfortunately, the advice offered will actually cause your application to be treated as “crashed” by Navigator (though it happens silently).


For a Cascades application, it is better for an application to use bb::Application::instance()->requestExit()  (or if you have your own instance lying around, just myApplication->requestExit()).


This uses the normal application lifecycle termination.

Mark Sohm
BlackBerry Development Advisor

Please refrain from posting new questions in solved threads.
Problem solved? Click the Accept As Solution button.
Found a bug? Report it using Issue Tracker