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

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: June 8, 20262026-06-08T17:16:34+00:00 2026-06-08T17:16:34+00:00

When i press home key for long time in my android device.I get list

  • 0

When i press home key for long time in my android device.I get list of all recent applications. Now i want to kill all my recent applications pro grammatically from within my application.
I am able to get list of all recent applications but not able to kill all apps.

I want to achieve it with android version 4.x

Can anyone guide me ?

  • 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-08T17:16:35+00:00Added an answer on June 8, 2026 at 5:16 pm

    First get a list of RunningTaskInfo records using the following:

     [public List<ActivityManager.RunningTaskInfo> getRunningTasks (int maxNum)][1]
    

    Reference

    After that, you can use the process-ids in that list to terminate the relevant processes
    using either

    activityManager.killBackgroundProcess(pid);
                        or
    android.os.Process.killProcess(pid);
    

    depending upon whether you can kill that process. Way to kill these is detailed here.

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

Sidebar

Related Questions

when we press on the Home button two times then we see the all
I am making an application. Now what i want is that whenever user Press
Scenario: Activity A launches Service S. Press 'Home'/'back' key to not to display A.
I need perform some action on press of home key like starting activity when
I want to know how to exit an app when user press the Home
I want to get an event to my application when someone presses the Home
when I am playing the game and I press the Home Key. The view
I use NSUserDefaults in my setting. App works well even I press home key
We all know that hitting the back button on the device doesn't kill the
I wanted to get Get Key press, Key release Events out of my Activity

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.