Assume I have two activities.
Activity A and Activity B, while Activity A is main activity.
There is a button in Activity A that will go to Activity B.
So, Activity A -> click -> Activity B and then click back button, it will go back to Activity A.
However, there is another story that I will have a GCM notification.
When clicking the notification, it will immediately go to Activity B.
But the problem is:
- If the application already run, when I click the notification and go to Activity B, and then click back button, it will correctly go back to Activity A.
- If I kill the application, and click the notification and go to Activity B, and then click back button, it will go to the Home Screen. But the problem is I want it will go back to Activity A.
How to solve this problem?