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.
07-30-2011 09:14 AM
I know that there are thousand of posts about this,but I want to know is there any way to when application exit from anywhere,I mean no mather what is current screen when end call button is presing I want to exit application.Or I must provide onClose function to every screen?
07-30-2011 11:11 AM
I know.I just don't want to write onClose,keyDown or keyChar code for each screen.
I asked if there any general way to put some code and don't bother about writing any more code elsewere.
07-31-2011 11:41 AM
MainScreen will anatomically close the application if you close the last screen in the DisplayStack.
So if you start with one MainScreen and then push another MainScreen , then closing that second MainScreen will correctly display the first MainScreen underneath, But closing the first MainScreen will exit the app.
Alternatively, start on the first MainScreen , when you push the second MainScreen , if you also pop the first MainScreen, the closing the second one will close the app.
That said, I think this is bad practice, I recommend you create a general exit point for your application and make sure it always goes through this. That way it can tidy up any resources that it needs to.
07-31-2011 05:36 PM
Thanks Peter, I did the following in each main screen I overrides the keydown event and in it I check if the end call button is pressed then I call my custom function which will pop screens until the first one and after that exit application.However I don't like this approach.