Removing Activity From the Stack
<p>I have 2 activities, normally I open activity A which then opens activity B. </p>

<p>In the case that a user clicks on a notification and the application is not running at all then B opens first. However when the users clicks the up/actionbackHome button the user should be taken back to A. I have done this by overwritting the up/actionbarHome button and starting activity A and calling finish on B. This works fine as if the user clicks back they exit the app as normal.</p>

<p>The problem is after that, when the user selects this task from the task manager, activity B opens. How can I ensure activity A opens in this case?</p>

<p><strong>Edit</strong></p>

<p>So I think the problem is that when I exist the app after I opened it via a notification, the app is still in the task manager. So if I enter the app via the task manager it starts it up in the same way it did from the notification. How do I stop this behaviour?</p>
