Clearing activity stack is not working
<p>I have the following setup for my activities:</p>

<p><strong>A (noHistory) -> B -> C -> D -> E</strong></p>

<p>So when I start <code>activity E</code> from <code>activity D</code> I want <code>E</code> to become the root activity and clear the rest of the back stack.</p>

<p>I followed the solution mentioned in many posts here which is to add the following flags to my Intent:</p>

<pre><code>final Intent explicitIntent = new Intent(this,
                E.class);
        explicitIntent.addFlags(Intent.FLAG_ACTIVITY_CLEAR_TOP); 
        explicitIntent.addFlags(Intent.FLAG_ACTIVITY_NEW_TASK);
        this.startActivity(explicitIntent);
</code></pre>

<p>However, <code>Activity E</code> (which was not running before) does not become the root of the back stack. Instead, just <code>Activity D</code> is deleted from the back stack, <code>C</code> and <code>B</code> are still there if I press the back button.</p>

<p>So is what I want to achieve really impossible in SDK &lt; 11 as described here: <a href="http://stackoverflow.com/questions/3473168/clear-the-entire-history-stack-and-start-a-new-activity-on-android">Clear the entire history stack and start a new activity on Android</a> ?</p>
