Sign Up

Sign Up to our social questions and Answers Engine to ask questions, answer people’s questions, and connect with other people.

Have an account? Sign In

Have an account? Sign In Now

Sign In

Login to our social questions & Answers Engine to ask questions answer people’s questions & connect with other people.

Sign Up Here

Forgot Password?

Don't have account, Sign Up Here

Forgot Password

Lost your password? Please enter your email address. You will receive a link and will create a new password via email.

Have an account? Sign In Now

You must login to ask a question.

Forgot Password?

Need An Account, Sign Up Here

Please briefly explain why you feel this question should be reported.

Please briefly explain why you feel this answer should be reported.

Please briefly explain why you feel this user should be reported.

Sign InSign Up

The Archive Base

The Archive Base Logo The Archive Base Logo

The Archive Base Navigation

  • SEARCH
  • Home
  • About Us
  • Blog
  • Contact Us
Search
Ask A Question

Mobile menu

Close
Ask a Question
  • Home
  • Add group
  • Groups page
  • Feed
  • User Profile
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Buy Points
  • Users
  • Help
  • Buy Theme
  • SEARCH
Home/ Questions/Q 8053781
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: June 5, 20262026-06-05T07:57:32+00:00 2026-06-05T07:57:32+00:00

I want to come to home screen when clicking on the back button from

  • 0

I want to come to home screen when clicking on the back button from my application in blackberry. I have searched for this in google and stackoverflow, But I didn’t get any solution. Anybody help for this.

In My Starting Screen i wrote like this for back button.

protected boolean keyDown(int keycode, int time)
    {
        if (Keypad.key(keycode) ==  Keypad.KEY_ESCAPE)
        {
            close();
            return true;
        }

        else
        {
            return super.keyDown(keycode, time);
        } 
    }

In my HomeScreen i wrote like this.

protected boolean keyDown(int keycode, int time)
    {
        if (Keypad.key(keycode) ==  Keypad.KEY_ESCAPE)
        {
            UiApplication.getUiApplication().pushScreen(new StartingScreen());
            return true;
        }

        else
        {
            return super.keyDown(keycode, time);
        } 
    }

From my application HomeScreen I am able to come to starting screen of the my application. after that when i click on back button from starting screen i need to go to blackberry home screen that means i need to exit the app and come out of that. I wrote close(); to come to blackberry home screen. but its not working. it is again coming to my application homescreen.

  • 1 1 Answer
  • 0 Views
  • 0 Followers
  • 0
Share
  • Facebook
  • Report

Leave an answer
Cancel reply

You must login to add an answer.

Forgot Password?

Need An Account, Sign Up Here

1 Answer

  • Voted
  • Oldest
  • Recent
  • Random
  1. Editorial Team
    Editorial Team
    2026-06-05T07:57:34+00:00Added an answer on June 5, 2026 at 7:57 am

    I got the Solution… i have written lik this.

    public boolean onClose() 
        {
            int choose=Dialog.ask(Dialog.D_YES_NO, "Are you sure Want to Exit?");
            if(choose==Dialog.YES)
            {
                System.exit(0);
    
            }
            return true;
        }
    
    • 0
    • Reply
    • Share
      Share
      • Share on Facebook
      • Share on Twitter
      • Share on LinkedIn
      • Share on WhatsApp
      • Report

Sidebar

Related Questions

Does TimerTask work even if my exit my application and come to home screen
I have a button on my home screen that will add an edit text
I want to come up with a language syntax. I have read a bit
I`v come across a need where I want to create multiple list items from
I want that the menu i have created for testing entries should come in
I want to generate XML from existing xml but values should come from some
I want to access camera to record video to upload, but have come across
I want to develop a page where post feed from facebook can be searched.I
I come from the Microsoft world (and I come in peace). I want to
I want to have an application that displays all of my website's external links

Explore

  • Home
  • Add group
  • Groups page
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Users
  • Help
  • SEARCH

Footer

© 2021 The Archive Base. All Rights Reserved
With Love by The Archive Base

Insert/edit link

Enter the destination URL

Or link to existing content

    No search term specified. Showing recent items. Search or use up and down arrow keys to select an item.