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

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: June 9, 20262026-06-09T08:21:40+00:00 2026-06-09T08:21:40+00:00

I am using the following snippet to check whether applications that I finish() ed

  • 0

I am using the following snippet to check whether applications that I finish()ed are indeed no longer running:

ActivityManager am = (ActivityManager)this.getSystemService(ACTIVITY_SERVICE);
List<ActivityManager.RunningAppProcessInfo> procList = am.getRunningAppProcesses();
for (ActivityManager.RunningAppProcessInfo proc : procList)
    Log.d(TAG, proc.processName);
}

To my dismay, some applications that I finish()ed (in their Activity.onCreate(), even before they had a chance to launch anything), are still listed there.

Why?

LogCat shows that these applications’ onDestroy() was definitely called.

What does it take to truly remove an application from that list?

Is killProcess() my only recourse?

  • 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-09T08:21:41+00:00Added an answer on June 9, 2026 at 8:21 am

    This is an area of confusion for many, as can be seen in this other thread.

    In fact, even this book from a respected source such as O’Reilly can confuse matters by suggesting that the Destroyed state can mean “killed” and that it can be reached from either onDestroy() or process killed:

    enter image description here

    IMHO, that O’Reilly state diagram is flawed and doesn’t reflect the full behavior of the system as the “official” diagram does:

    enter image description here

    Analyzing this diagram, one can conclude that onDestroy() never automatically leads to App process killed. I believe this answers your first question.

    As for you second question, the answer is yes: If you really want to totally kill your application’s process (why would you want to do that?), then your only recourse is killProcess().

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

Sidebar

Related Questions

I am using the following code snippet to calculate a total price. This works
I have the following code snippet: using (SPSite site = new SPSite(this.ListAddress)) { using
I've constructed a DataGrid by adding columns programatically using the following snippet: var check
Here is a snippet (if you are using Opera, check out this link). As
I am using following snippet to build a 32 bit integer to use with
I'm using the following code-snippet extensively in my model templates. <div class=control-group> @Html.LabelFor(model =>
From the book Groovy and Grails recipes I'm using the following code snippet: String
I have the following snippet of code (I'm using jQuery 1.4.2): $.post('/Ads/GetAdStatsRow/', { 'ad_id':
I'm using Bootstrap to style my website. I have the following snippet in my
I could build a sip profile using SipProfile.Builder class. I used following snippet of

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.