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

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: May 24, 20262026-05-24T03:45:26+00:00 2026-05-24T03:45:26+00:00

Possible Duplicate: Android: How to kill an application with all it's activities? I tried

  • 0

Possible Duplicate:
Android: How to kill an application with all it's activities?

I tried with finish().

But it just close the present activity not whole application.
as the another activity is running hide it shows when i finish the above activity..

CODE :

public class third extends  Activity{

Button btn_back, btn_finish;
Intent intent2;
Bundle b1;


 public void onCreate(Bundle savedInstanceState) {
        super.onCreate(savedInstanceState);
        setContentView(R.layout.third);


        intent2 = getIntent();
        b1=intent2.getExtras();
        String spin = b1.getString("name");
        String gender = b1.getString("gender");



        btn_back = (Button) findViewById(R.id.button1);
        btn_finish = (Button)   findViewById(R.id.button2);
        Toast.makeText(third.this, spin + "" + gender , Toast.LENGTH_SHORT).show();

        btn_back.setOnClickListener(new OnClickListener() {

            public void onClick(View v) {
                intent2 = new Intent (third.this,second.class);
                startActivity(intent2);
            }
        });

        btn_finish.setOnClickListener(new OnClickListener() {

            public void onClick(View v) {
                finish();
            }
        });
 }

}

  • 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-24T03:45:27+00:00Added an answer on May 24, 2026 at 3:45 am

    Use this line of code:

    System.exit(1);
    

    The integer 1 is just a return code.

    EDIT
    This was answered when I first started android development: Please do not use it. You could try Adding an Exit button to Android Application.

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

Sidebar

Related Questions

Possible Duplicate: How to test the performance of an Android application? How can i
Possible Duplicate: How to test the performance of an Android application? The test cases
Possible Duplicate: Android Activity Life Cycle - difference between onPause() and OnStop() Can anybody
Possible Duplicate: Android AdMobs problem. I am trying to put in an ad but
Possible Duplicate: slow android emulator My tablet is not here yet, which is why
Possible Duplicate: How to restrict Android device to not open some specific site e.g.youtube,
Possible Duplicate: Bluetooth support on Android Emulator I want to develop an Android Application
Possible Duplicate: Android - Application (apk) Maximum size I want to install an APK
Possible Duplicate: Android NoSuchAlgorithmException: SSLContext SSL implementation not found Has anybody experience with this
Possible Duplicate: Eclipse Android SDK slow Content Assist performance For reasons not worth discussing

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.