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

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: June 6, 20262026-06-06T20:39:36+00:00 2026-06-06T20:39:36+00:00

For my app if I use finish() then it will close activity A .

  • 0

For my app if I use finish() then it will close activity A. For the activity stack like A->B->C(currently visible) if I use finish() in C it will close C, not A or B and B resumes.

In such cases if I need to close all the activities at a glance by clicking a Close button in activity C then what is the solution ? Does Android provide any technique to achieve this ?


NOTE: I found a solution Here which is partially helpful, not enough to solve my problem. Though you may get some idea(s) from here.

  • 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-06T20:39:38+00:00Added an answer on June 6, 2026 at 8:39 pm

    Ok, on close button click send a broadcast to your home activity then then call this :

    // Inside broadcast recevier do this, it wont allow then write below code in a separate function and call this. 
    Intent intent = new Intent(getApplicationContext(), Home.class);
    intent.addFlags(FLAG_ACTIVITY_CLEAR_TOP);
    startActivity(intent);
    finish();
    System.exit(0);
    

    It will work surely, i have already done before and it is working for me.

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

Sidebar

Related Questions

Okay say your using a app, and you opened a new activity and then
I have an app which I want to open, use, and then at the
I'm converting an app to use fragments using the compatibility library. Now currently I
I am trying use the onClick() function in an activity for an android app.
I am developing a Rails app. I would like to use an array to
HI i change the app state and then i want to reload the activity
if your app use this solution , do do you plan port the app
My configuration: app.configure(function(){ app.set('views', __dirname + '/views'); app.set('view engine', 'jade'); app.use(express.bodyParser()); app.use(express.cookieParser()); app.use(express.session({ secret:
In my app I use a static database to store all counties and census
I have a Django app that use a django-tagging. I need to port this

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.