thanks jotobjects, I wanted to add few comments:
1.when I used the "singleTask" in launchMode, when I opened the app icon from the Home screen, it stated Activity A and not the last Activity. so this is not the solution. 2.from: http://developer.android.com/intl/de/guide/topics/manifest/activity-element.html I understand that I actually need to use "singleTop" since: "The "standard" and "singleTop" modes differ from each other in just one respect: Every time there's new intent for a "standard" activity, a new instance of the class is created to respond to that intent. Each instance handles a single intent. Similarly, a new instance of a "singleTop" activity may also be created to handle a new intent. However, if the target task already has an existing instance of the activity at the top of its stack, that instance will receive the new intent (in an onNewIntent() call); a new instance is not created." using "singleTop" did solve the "open from Home screen icon" behavior but it still didn't fixed the "open from Market" behavior. again, I'm trying getting the application to always open from the last Activity no mater how it is opened. does anyone has any other thought on how to solve this? ayanir On Jan 27, 9:34 pm, jotobjects <[email protected]> wrote: > On Jan 27, 2:13 am, ayanir <[email protected]> wrote: > > > Hello, > > > I have a similar problem when I open the application from the Market. > > > if I go from Activity A (LAUNCHER) to B, press Home key and re open > > the application from the Home screen icon it come back to Activity B > > (the last Activity) as it should. > > but, if I open the application from the Market application, it open > > Activity A. > > what is the difference between these two > > Not sure exactly about the difference, but the general point is that > the Home Screen launcher is keeping track of the "Task" that was > launched from the Home screen for that app and will resume that same > task with the Activity that is on top of that task. This only applies > to launching from the Home screen. > > > and how can it always open > > from the last Activity no mater how I open the application? > > A possible answer is to set "singleTask" launchMode. -- 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

