How do Task Managers kill apps?

后端 未结 4 1581
甜味超标
甜味超标 2020-11-27 20:01

First of all I know it\'s bad to use a task manager/killer in Android and all that, but what I was wondering is how do task managers like Advanced Task Killer k

4条回答
  •  天命终不由人
    2020-11-27 20:08

    You can send the signal using:

    Process.sendSignal(pid, Process.SIGNAL_KILL);
    

    To completely kill the process, it's recommended to call:

    ActivityManager.killBackgroundProcesses(PackageName)
    

    before sending the signal.

提交回复
热议问题