How to close other apps
<p>I have simple code for this problem.</p>

<pre><code>ActivityManager activityManager = (ActivityManager) context.getSystemService(- activity -);
activityManager.killBackgroundProcesses(- package name -);
</code></pre>

<p>or</p>

<pre><code>ActivityManager activityManager = (ActivityManager) context.getSystemService(- activity -);
activityManager.restartPackage(- package name -);
</code></pre>

<p>But i dont know what i can write on activity and package name areas.</p>

<p>Sorry for my English.</p>