Hi, Set your Activity Launch mode to singleTask.
On Fri, Feb 25, 2011 at 11:53 AM, ZEAN QIN <[email protected]> wrote: > When my application is running, I can click the "HOME" button to send the > app to the background. Then I can get back to the application by using one > of the 4 ways: > 1. click the icon in the launch menu > 2. or click the shortcut icon on the home screen > 3. or long click the "HOME" button to see the "Recent" used apps and > then click the app icon > 4. or search for the app in the quick launch box and then click the > icon. > The first 3 ways seem to work fine for me, all of them can send my app back > to the foreground and keep the data I have entered. None of them seems to > create a new instance of the app. While the 4th way seems to create a new > instance of my app and crashes my app. > Is this always the case? Or because I did not write my code properly ? > I set add the "FLAG_ACTIVITY_REORDER_TO_FRONT" flag to most of the intents I > use, so no new instance of an activity should be created. Maybe the problem > is somehow related to this, but I don't know. Please help me. > Thanks > > -- > 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 -- 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

