Long story short, I have a LaunchActivity which is always called by LAUNCHER (i.e. the home screen). It then starts LoginActivity and then closes itself.
This is the flow:
- User launches app
- LaunchActivity starts, starts LoginActivity and then calls finish() on itself (At this point LoginActivity is the only Activity on the stack)
- User press "Home" button, stopping LoginActivity
- User launches the app again
When the app is launched for the 2nd time, two things can happen:
- LaunchActivity starts, finishes itself and then STARTS LoginActivity
- LaunchActivity starts, finishes itself and then CREATES LoginActivity, so there are now two LoginActivitys on the stack.
(2) seems to happen when I restart Eclipse and the simulator (yeah I know, black magic).
Some extra info: I'm not using any start flags and my manifest doesn't have any launchModes defined.