Run app from last Activity after app kill
<p>In my app I have 3 activities:</p>

<p>1 activity:
It is starting Activity</p>

<p>In manifest:</p>

<pre><code>&lt;activity android:name=".First"&gt;
        &lt;intent-filter&gt;
            &lt;action android:name="android.intent.action.MAIN" /&gt;

            &lt;category android:name="android.intent.category.LAUNCHER" /&gt;
        &lt;/intent-filter&gt;
    &lt;/activity&gt;
</code></pre>

<p>2 activity:
It is login screen Activity.</p>

<p>3 activity:
Activity is showing after correct Login.</p>

<p>In manifest:</p>

<pre><code>&lt;activity android:name=".Third"&gt;
        &lt;intent-filter&gt;
            &lt;action android:name="android.intent.action.MAIN" /&gt;

            &lt;category android:name="android.intent.category.DEFAULT" /&gt;
        &lt;/intent-filter&gt;
    &lt;/activity&gt;
</code></pre>

<p>In 3. Activity I have button logout. When I click logout button. App is going to Activity 2. And after restart (kill app and start again). App started from 1. Activity. And it's correct. </p>

<p>But when I don't click logout button and restart(kill app and start again). App must started from 3 Activity (user must be still logged-in).</p>

<p>Probably I should manipulate intent flag. </p>