1. Check out our companion app, Forums for Android! Download from Google Play

Killing processes

Discussion in 'Application Development' started by fabiocberg, Nov 17, 2010.

  1. fabiocberg

    fabiocberg Active Member
    Thread Starter
    16

    Apr 7, 2010
    27
    1
    16
    Programmer (Coordinator)
    Brazil
    Hello All,

    I'm developing an application like an Task Killer, but not exactly.
    My application needs to kill a specific process.

    I'm using this code below to get the running processes:
    Code (Text):
    1. ActivityManager actvityManager= (ActivityManager) this
    2.         .getSystemService(ACTIVITY_SERVICE);
    3.         List<RunningAppProcessInfo> procInfos = actvityManager.getRunningAppProcesses();
    Into each RunningAppProcessInfo, it has the PID.
    I thought I could use this: Process.killProcess(info.pid);
    But it only works to my own app or a process that was started by my application.
    But I need to kill other processes from the list.
    Someone else knows how can I kill any process?
    Any Task Killer app does that, someone knows how they do it?

    Thanks!
     

    Advertisement

  2. fabiocberg

    fabiocberg Active Member
    Thread Starter
    16

    Apr 7, 2010
    27
    1
    16
    Programmer (Coordinator)
    Brazil
  3. fabiocberg

    fabiocberg Active Member
    Thread Starter
    16

    Apr 7, 2010
    27
    1
    16
    Programmer (Coordinator)
    Brazil
    please, someone could help me?
     
  4. GoodWin

    GoodWin New Member
    5

    Jan 5, 2011
    1
    0
    5
    up!
    How?
     

Share This Page

Loading...