I\'ve read some posts stating that using this method is \"not good\", shouldn\'t be used, it\'s not the right way to \"close\" the application and it\'s not how Android work
In my opinion, the reason why kill process is not recommend by some Android developer is , it's hard to make sure all the service, activity quit safely and properly if you just simply kill the process. For a APP developer, their APP may sharing data with other APP, some Activities may export to others. If you kill the process, other app might goes wrong. Moreover, in most of cases, you actually do not need "kill" the app, just finish what you are doing and what you don't wanna user see, leave other works to the Android system. They know better than us. OK, if you know clear what you wanna do, don't care about open faster and so on, like you wanna quit a game when users click some button, your game of course will not export to other app, will not sharing data outside your game, it's ok to do this, just carefully make sure no other services or thread need running. In this case, I recommend finish all the activities before you kill the process, just to make sure Activities properly save state, I'll call something like:
activity.finishAffinity();
Process.killProcess(Process.myPid());
in Current Activity. This is just my opinion, and it's welcome to correct me.