I have a notification that needs to start a activity B. However, I want to be able to let the user “go back” to the Dasboard A.
I am wondering how this could be done? Will I need to use a intent extra to start A and process that intent in onCreate and then start B manually? Or is it possible to manually specify a backstack?
I would go with your own solution and create an Intent to activity A and somehow tell activity A in this Intent that it should start Activity B.
This behavior is not the standard Android behavior. The user should be used to get to the last screen with the back button. I would not try to hijack this Operating System feature.
If in your case the user for example is sent to a detailview of a message through the notification, back should close your app and move back to the previous screen. If you want to give your user the possibility to go “back” from the message to the overall message inbox, use the up navigation structure that can be used with the ICS Action Bar. Sounds complicated but in the essence it only means that you need to add a Button that takes the user to the Inbox. Since the introduction of the Actionbar (Summer 2010 I think) there is a standard position for this up button. It is in the upper left corner of the screen. (just like the iOS back button 😉 )