1

Lets say I have three Activities in my App.

1) Signup Activity 2) AccountActivate Activity 3) Main Activity

Order 1 -> 2 -> 3 (User Signs Up -> if Sign up is successful -> Enters PIN and activates account -> if activation successful -> lands in Main Activity

Now here is the problem.

Once I am in Main and the activation is complete, and I press the hardware key (BACK) on the phone or the emulator I am taken to AccountActivate Activity (2) again. I do not really want this to happen since the Account has been activated so the user should not really see this again. Is there a way I can handle this?

Thanks for all the help guys.

Aakash
  • 3,101
  • 8
  • 47
  • 78
  • possible duplicate of [Removing an activity from the history stack](http://stackoverflow.com/questions/1898886/removing-an-activity-from-the-history-stack) – EboMike Oct 28 '10 at 18:37

1 Answers1

3

You call finish() when you go from 2) to 3). Or you use Intent.FLAG_ACTIVITY_NO_HISTORY.. This has been asked many times.

EboMike
  • 76,846
  • 14
  • 164
  • 167
  • I am sorry about the repetition. Will do that, Thanks! – Aakash Oct 28 '10 at 18:37
  • Hi EboMike would you be able to help me out with this question. http://stackoverflow.com/questions/4036494/how-can-i-integrate-paypal-to-payout-users-when-a-button-is-clicked – Aakash Oct 28 '10 at 18:51
  • Sorry, I've never used PayPal in an app, other than linking to a PayPal button in an HTML document... – EboMike Oct 28 '10 at 19:01