My app (as currently designed) offers the user a menu "quit" option
that calls finish() on the activity, where I do saving and cleanup in
the onPause and onDestroy methods.   When initially downloaded to the
emulator things run fine, but after quitting, when I go to the apps
page and click on my app icon, I get a blank screen and an occasional
notice that the activity is not responding.

I have found a few postings of this same problem, but no good answers.

My log shows that the finish() does cause on Pause then onStop then
onDestroy to be called in sequence as expected.  All successfully
complete and return.  But I still get an activity destroy timeout (and
at the attempted restart, a launch timeout expired).  The only thing
non-trivial is a game thread, but the terminate and join with the UI
thread in onDestroy seems to work just fine (I commented out all uses
of just about everything else in Android, e.g. SoundPool, view
Animation).

I looked at the LunarLander example application.  It "stops"
differently (e.g. doesn't call finish(), terminates the game thread
when the surface is destroyed), but it has similar although less
repeatable problems (e.g. unexpected termination messages, destroy and
launch timeout messages in the log, subsequent clicks on the app icon
just open a black screen).

Any suggestions?  Any guidelines for a good way to "exit" an
application so it can be cleanly restarted?

-- 
You received this message because you are subscribed to the Google
Groups "Android Beginners" group.

NEW! Try asking and tagging your question on Stack Overflow at
http://stackoverflow.com/questions/tagged/android

To unsubscribe from this group, send email to
android-beginners+unsubscr...@googlegroups.com
For more options, visit this group at
http://groups.google.com/group/android-beginners?hl=en

Reply via email to