Hi Gil, You probably have the exactly same issue that is discussed in:
http://groups.google.com/group/android-developers/browse_thread/thread/112f3eb6b9b47d29# Like Justin said, there is no need to use singleTask, singleTop or any other special flags. It has something to do with the way Eclipse re- installs your application. If you run without using Eclipse everything should work fine. I do the following to get the correct behaviour: 1. I run my app in Eclipse using Run > Run History > myApp. The app opens up with the home activity 2. I hit the Back button. The Android home screen with the app menu is displayed 3. I start my app from the Android app menu. The app opens up with the home activity 4. From now on, it will work as expected so when I press Home in a 'secondary' activity and then restart my App again from the Android app menu it will go back to the 'secondary' activity. Hope that helps On Aug 27, 7:45 pm, "Justin (Google Employee)" <[EMAIL PROTECTED]> wrote: > The answer is that singleTask and singleTop are working as intended. > > Basically, you're overthinking what you need to do. Don't use > singleTask for your base Activity, just add the following intent- > filter to the activity you're using singleTop with. > > <intent-filter> > <action android:name="android.intent.action.MAIN" /> > <category > android:name="android.intent.category.DEFAULT" /> > </intent-filter> > > This filter means that your single top activity will be able to > respond to an Intent from the HOME screen. In fact, my guess is that > you don't even need singleTop. If you always expect that people would > be sending the Intent to start the second activity with the NEW_TASK > flag sent, then this isn't really an issue. Also, if you only expect > that people will get back to your second activity via the home screen, > singleTop is unnecessary because Intents from the home screen always > have the NEW_TASK flag set. > > Moral of the story: beware premature optimization, try the defaults > *first*, then search for solutions if they don't work. > > Cheers, > Justin > Android Team @ Google > > On Aug 25, 5:54 pm, "Justin (Google Employee)" <[EMAIL PROTECTED]> > wrote: > > > > > No, I would have provided one if there was, :-) . But if your question > > is if its still be looked at, the answer is yes. > > > Cheers, > > Justin > > Android Team @ Google > > > On Aug 25, 5:46 pm, Gil <[EMAIL PROTECTED]> wrote: > > > > Hi Justin, > > > > Any update related to this issue?- Hide quoted text - > > - Show quoted text - --~--~---------~--~----~------------~-------~--~----~ 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] Announcing the new Android 0.9 SDK beta! http://android-developers.blogspot.com/2008/08/announcing-beta-release-of-android-sdk.html For more options, visit this group at http://groups.google.com/group/android-developers?hl=en -~----------~----~----~----~------~----~------~--~---

