title: Android Force Close Specify App
body: <p>I want force close another specify app , the same as "Setting" -> "Apps" -> "my app name" -> "Force stop" , I try it with 2 ways , as follows:
  1. ActivityManager forceStopPackage</p>
  
  <pre><code>Method forceStopPackage;                
  forceStopPackage =am.getClass().getDeclaredMethod("forceStopPackage",String.class);
  forceStopPackage.setAccessible(true);
  forceStopPackage.invoke(am, "this is the specify package name");
  </code></pre>
  
  <ol>
  <li><p>the code is like this </p>
  
  <p>android.os.Process.killProcess("this is a pid that I got from the Running specify app");
  android.os.Process.sendSignal(pid, Process.SIGNAL_KILL);</p></li>
  </ol>
  
  <p>But,both not works, I have no idea,and I need your help.</p>