Resume application and stack from notification
<p>I want to resume my app from a status bar notification in the exact same manner as when the user taps its icon in the launcher.</p>

<p>That is: I want the stack to be in the same state as it was before the user left it.</p>

<p>The problem when setting a pending intent on the notification is that it always targets a specific activity. I don't want this. I need to resume the application just as the launcher does.</p>

<p>So if the user is in activity A, I want to resume activity A. If he has launched activity B from activity A, then I want B to be displayed when the user taps the notification, and the stack to be restored so that A gets resumed when the user taps the back button in B.</p>

<p>There are couple of other questions of questions with similar titles, but none address my problem.</p>
