System.exit() will not necessarily fix this. If the application has left its activity stack in a bad state and does this in the background, the stack is still being maintained by the system and will be restored as per its last state when the application's process is re-created.
Also system.exit() can break the behavior of an app, so it should be avoided. On Tue, Apr 26, 2011 at 12:46 AM, Indicator Veritatis <[email protected]>wrote: > System.exit() as a feature for the paranoid user? I wish that were > never necessary. But there is yet another case where I wish I had the > app calling system.exit() itself: when the app has done a bad job of > keeping track of state, and leaves the user, yes, even the > sophisticated user, with no idea how to navigate back to a known good > state in the menu tree. Then the only way for me to get the app back > to the top of the tree is to kill it with SystemExit (the application, > not the API) and start it again. > > One of the promised benefits of certain competing Android Application > Markets is that the Market staff will verify the program the developer > submits, checking for stupid errors like this one, as well as other > failures to do Android Lifecycle management correctly before approving > the application for distribution. But I haven't had enough experience > with them yet to know whether they keep this promise or not. They may > have found they bit off more than they could chew. > > On Apr 25, 4:49 pm, lbendlin <[email protected]> wrote: > > oh yes there is. It is called "paranoid user" and that species will > accuse > > your program of draining the battery, heating the atmosphere, and scaring > > little children. No matter how often you explain to them how Android > keeps > > applications around "just in case" they want that EXIT button. They get > > their button, and I can keep my sanity (well, sort of). > > -- > 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 > -- Dianne Hackborn Android framework engineer [email protected] Note: please don't send private questions to me, as I don't have time to provide private support, and so won't reply to such e-mails. All such questions should be posted on public forums, where I and others can see and answer them. -- 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

