Difference between ::
int pid = android.os.Process.myPid();
android.os.Process.killProcess(pid);
//And
int pid = android.os.Process.myTid();
android.os.Process.killProcess(pid);
//And
int pid = android.os.Process.myUid();
android.os.Process.killProcess(pid);
Only the first one will get the actual process Id and properly kill the process. The other examples will fail because you’re passing the wrong process id to killProcess().
From the docs:
See the docs for more details.
http://developer.android.com/reference/android/os/Process.html
Here are some additional links: