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.
That is: I want the stack to be in the same state as it was before the user left it.
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.
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.
There are couple of other questions of questions with similar titles, but none address my problem.
Question&Answers:
os 与恶龙缠斗过久,自身亦成为恶龙;凝视深渊过久,深渊将回以凝视…