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 6048159
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: May 23, 20262026-05-23T07:25:55+00:00 2026-05-23T07:25:55+00:00

I have opened 3 activities. Now the user want to exit the application. for

  • 0

I have opened 3 activities. Now the user want to exit the application. for that I have to finish all the activities. It is not recommended to do this but My application wants to provide such an exit point to user. How to close application when multiple activities are alive

Thanks

  • 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-05-23T07:25:56+00:00Added an answer on May 23, 2026 at 7:25 am

    All actrivities of any application use the same process id in android. that means only one activity stay at th top and that activity share the same process which was created by other activity. so killing an process id is same as finish() on activity.
    If you have called Activity B from activity A. when activty B is killed then your control comes to onResume() method of activity A.
    you can use this behaviour.

    let you have created a button on click of which you will exit the application. to achieve this. set a static boolean value on click of that method. andr finish the activity.

    MyConstant.isApplicationTerminated = true;
    finish();
    

    Now in every class which extends Activity override onResume() as follows

        @Override
        protected void onResume() {
            // TODO Auto-generated method stub
    if(MyConstant.isApplicationTerminated){
            finish();
    }
            super.onResume();
        }
    

    In this way you can exit an application

    Thanks
    Deepak

    • 0
    • Reply
    • Share
      Share
      • Share on Facebook
      • Share on Twitter
      • Share on LinkedIn
      • Share on WhatsApp
      • Report

Sidebar

Related Questions

I have opened five notepad.exe's. Now I want to know all the process id's
I have an application that runs only once. But after finishing ( finish() ),
I have a longish list of files opened in vim that looks like this:
I have a DB that I use in all my activities. There is only
I have opened a webpage in HtmlUnit headless browser. Now that webpage contains a
I have opened a new window with JavaScript: var newwin = window.open('','preview','width=600,height=500'); Now I
i have tried this: <?php $fileip = fopen(test.txt,r); ?> this should have opened the
I can switch between windows with C-x o, but if I have opened multiple
I have several aspx pages that can be opened either normally (full screen in
I have a dialogue in GTK# that gets opened by a mouse click, and

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.