In my application, i have five activity a,b,c,d,e. User transits in following sequence.... 1. a -> b 2. b -> c 3. c -> d 4. d -> e
up to the activity 'd', if user presses the back button, application should redirect user to the previous activity like d -> c , c -> b and so on...
But when user click's on save button in activity 'd', application will redirect user to the activity 'e'.now if user presses the back button then i want to redirect user to the activity 'a',which is home screen in my application.
I am completely new to the android. I don't know how to achieve this flow.I tried this solution but it hasn't yielded desired result. and sorry for my bad English...