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

The Archive Base Latest Questions

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

I am beginner in android. When i click a Button KILL selected apps to

  • 0

I am beginner in android. When i click a Button KILL selected apps to close or kill a Particular(Running) Application or Selected Application. I Know it is possible. But how to work out it. My Sample UI is
http://answers.oreilly.com/index.php?app=core&module=attach&section=attach&attach_rel_module=post&attach_id=555
I am try to use some code. But all the codes can be used to close only for activities. Not Closed Application. May i tried to refer some stackoverflow answers. But i am not clearly understand anything. My code is

finish();
System.exit(0);
Intent i = new Intent();
i.setAction(Intent.ACTION_MAIN);
i.addCategory(Intent.CATEGORY_HOME);
startActivity(i);
android.os.Process.killProcess(android.os.Process.myPid());

Please reply your Answers and comments are valuable me. 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-06-05T16:05:03+00:00Added an answer on June 5, 2026 at 4:05 pm

    I Know it is possible.

    Not at your will though.

    android.os.Process.killProcess(android.os.Process.myPid());
    

    A note from the documentation about this method:

    Note that, though this API allows us to request to kill any process based on its PID, the kernel will still impose standard restrictions on which PIDs you are actually able to kill. Typically this means only the process running the caller’s packages/application and any additional processes created by that app; packages sharing a common UID will also be able to kill each other’s processes.

    About system.exit(0) , read this answer. And keep that in your mind.

    And about finish(), the documentation clearly says the following:

    “Call this when your activity is done and should be closed.“

    To sum it all up – don’t try to make a task killer. The android OS takes care of that perfectly well. Don’t meddle with it.

    The wheel has been invented and is being used perfectly, don’t reinvent it.

    Please read this. You need to understand that Android doesn’t require task killers. Google it and you will find many such articles.

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

Sidebar

Related Questions

I am a beginner to Android but I seem to be running across a
I am a beginner to android. I am building an application to work with
I am implementing a Database for my (beginner/Android) application. It is not clear to
I am a beginner in Android programming. I want to build a simple application
Im beginner in android development. I ve just created a button in main.xml file
I am a beginner android developer and I am trying to have a button
I'm a beginner to android. I need to know is there any intent to
I'm just a beginner with Android. I want the button to change its color
I am a beginner of Android apps and am using Eclipse. I have found
I'm a beginner in Android development but not in programming itself. Anyway, this question

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.