How start first activity ? (not always)
<p>I ran "Main" when i click button "exit"</p>

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

            startActivity(intent);
</code></pre>

<p>and then i return on my application and see... it's not first "activity".. this is  my last "activity"</p>

<p><strong>how can I set the program ... begin with the first activity?</strong></p>

<p>Only when I click "exit"</p>

<p>i have:
[1] activity [2] activity [3] [4]</p>

<p>when i pressed "exit" in [4] or [3] activity  i go "Main" and then  if i start  or return app i again create [1] activity
if i "turn back" or pressed button "down button" and return app i start "onResume()" when i pressed this buttons</p>
