android exit application completely and go to main applications screen
<p>i know that this question is asked many times, but really i can't understand the answer, i want to set button, when user click it i want to exit the application (also the carbage collector should remove the objects), and after exiting i want to go to the screen where the user found the application icon on mobile.</p>

<p>for exit i don't know what to do </p>

<p>for going to the screen where to find the application icon i tried like this</p>

<pre><code>Intent intent = new Intent(Intent.ACTION_MAIN);
            intent.addCategory(Intent.CATEGORY_HOME);
            intent.setFlags(Intent.FLAG_ACTIVITY_NEW_TASK);
            startActivity(intent);
</code></pre>

<p>but doesn't work</p>
