I have starting screen,which is my first activity in my application.
This activivty contains only one button and when its clicked, it should navigate to another activity which should prompt user for name.
If user press back button before confirming name, it should navigate back to the previous activity.
But when user confirm name, main activity should pop up and foregone activities should be removed from application.
I was looking for a solution and find it in creating static activity object , but i saw it was not wise and it is bad for memory.
What is the best approach for doing what i explained?