I have a start activity page for my game (which is the root activity
for my app) that just lists "Play", "Help", and "About" TextViews on
the screen.  Each TextView has a click listener which start the
appropriate Activity for each.  The GameActivity (started with
explicit intent from clicking "Play") has onSaveInstanceState
implemented to save state of the game.  Its onCreate checks for non-
null Bundle to restore this state.  My problem is this:

1. Turn on Phone/Emulator
2. start my game with icon in launcher
3. Start page is displayed
4. click "Play" to start my GameActivity
5. play game for a few seconds
6. click home
7. state is saved (proven with debugger calling onSaveInstanceState)
8. start my game with the icon in launcher
9. start page is displayed

I was under the impression that by clicking the app icon from the
launcher that my existing task activity stack would be restored with
my GameActivity being on top and its onCreate being called for me to
restore the state I saved.  Instead I am getting a brand new instance
of my start page.  Also, if I long press home and choose my running
game icon, then my game comes back exactly as I left it.  However,
this apparently is NOT using my onCreate restore state logic as
onCreate is never called.

All of the documentation seems to say that the entire stack of
activities will be restored when clicking the application icon from
the launcher, but I just get a fresh instance. What might I be doing
wrong?
-- 
You received this message because you are subscribed to the Google
Groups "Android Developers" group.
To post to this group, send email to [email protected]
To unsubscribe from this group, send email to
[email protected]
For more options, visit this group at
http://groups.google.com/group/android-developers?hl=en

Reply via email to