Is it possible to Stop the process on Android using the script running in Ruboto's IRB, i.e. automate: "Application manager" > "Running" > [Select process] > Press "Stop"?
Asked
Active
Viewed 96 times
1 Answers
0
A process can stop itself by executing
java.lang.System.runFinalizersOnExit(true)
java.lang.System.exit(0)
You can stop another process with
Process.KillProcess(int pid)
http://developer.android.com/reference/android/os/Process.html#killProcess%28int%29
You will need the KILL_BACKGROUND_PROCESSES permission:
http://developer.android.com/reference/android/Manifest.permission.html#KILL_BACKGROUND_PROCESSES

donV
- 1,091
- 7
- 15