Yeah @Amit, I logged a bug about this behavior here: http://code.google.com/p/android/issues/detail?id=5277&can=4&colspec=ID%20Type%20Status%20Owner%20Summary%20Stars
the loss of the history stack seems to happen any time you launch an activity with the FLAG_ACTIVITY_NEW_TASK flag. Try it out with an app downloaded from marketplace etc, On Feb 22, 12:20 am, ANithian <[email protected]> wrote: > I am glad to have run across this thread because I was noticing the > same behavior. I am running Eclipse 3.5 with the emulator 2.0.1 > (Google APIs). > > With my application, the same behavior described happens: > 1) Launch App --> Main Activity > 2) From Main Activity, click button to next screen > 3) Hit Home > 4) Re-launch app from either main screen (if it's shortcut on > "desktop" or from app list) > 5) See Main Activity again > 5a) Hit back button, goes back to screen that *should* have been > launched in the first place. > > I thought it was something in my application but then I setup in > Eclipse the GestureBuilder app, renamed the package so as to not > conflict with the already installed Gesture Builder and ran it. Same > behavior as above: > 1) Start "Gesture Builder NEW" ==> I renamed the application to not > confuse myself with the already installed one > 2) Click "Add Gesture" > 3) Enter a name > 4) Start drawing > 5) Hit home button > 6) Reload Gesture Builder NEW > 7) You see the main activity (the list of gestures with the button to > add a new one). > 8) hit the "back" button and you see the drawing in step 4. > > I didn't set a launch mode and didn't override onPause/onResume (as > the existing code didn't). The odd thing is that the pre-installed > "Gesture Builder" application doesn't exhibit this behavior. > > Is anyone else seeing this or has solutions to this? It's really weird > and annoying. > > Thanks > Amit > > On Feb 20, 10:52 am, jotobjects <[email protected]> wrote: > > > > > On Feb 19, 2:11 pm, jotobjects <[email protected]> wrote: > > > > // 2-This does not work - exception is "can't find Activity to handle > > > Intent" > > > Intent intent = new Intent(Intent.ACTION_VIEW); > > > intent.addCategory("foo.singletask.intent.category.FOO"); > > > Fixed that problem - if a category is listed in the <intent_filter> > > then CATEGORY_DEFAULT is required to also to be listed (not sure > > why). This is the intent_filter that works - > > > <action android:name="android.intent.action.VIEW" /> > > <category android:name="foo.singletask.intent.category.FOO" /> > > <category android:name="android.intent.category.DEFAULT" /> > > > RECAPPING THE ORIGINAL SUBJECT: > > > + For launchMode=singleTask if there is an intent_filter in the > > manifest the task stack is always cleared after returning toHomeand > > re-launching (returns to main activity instead of last activity). > > > + For launchMode=standard re-launch fromHomeinstead returns to last > > activity in task (as expected). > > > + If there is no intent_filter listed then even with > > launchMode=singleTask re-launch fromHomereturns to the last activity > > in the task. -- 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

