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.
04-27-2012 03:04 PM
I'm trapping the back button function on my app, throwing up and alert and exiting the app if the user confirms.
On the device, the alert shows up when I hit back however, confirming doesnt close the app.
This is my code.
blackberry.system.event has been enabled in config.xml
if (confirm("Are you sure you want to exit this application?"))
04-27-2012 09:38 PM
Use this code, will be helpful to you.
public boolean keyChar(char key, int status, int time)
boolean retval = false;
if(key == Characters.ESCAPE)
retval = true;
int response = Dialog.ask(Dialog.D_YES_NO, "Do you really want exit??");
if(response == Dialog.YES)
else if(key == Characters.ENTER)
retval = super.keyChar(key,status,time);
04-28-2012 12:07 AM
yes, i have test this code.
in this function, if you do press back button, then a dialog box will pop up. and that will give you two option.
1) yes 2) No
if you press yes, then app is close.
if no then current will screen will be continue.