Here is some more research on this: quick summary once again: I have two activities
1. main 2. search activity Nature of search activity **************************** 1. invoke a browser 2. finish after that 3. As a result browser will be showing when this search activity is invoked When does it work ************************ If I have never invoked the MAIN activity of this application then the back button on the invoked browser activity will take me back to where I came from. (home) when does it NOT work ****************************** If I invoked the MAIN activity at any time prior to the global search, then the back button on the browser will take me quite disconcertingly I should say to the MAIN activity irrespective of how far back in the history it is. The behavior seem un changed even if I set the android:allowTaskReparenting="false" What alternative I have **************************** In my case the MAIN activity happens to be spurious and unnecessary and I had it just for debugging. I had to remove this activity from the application to make this work reliably Hope these notes would be of some help if you were to stray this way. well anyways if you have some ideas I would love to hear them Thanks Satya On Sat, Oct 24, 2009 at 9:10 AM, Satya Komatineni <satya.komatin...@gmail.com> wrote: > I have a package with two activities > > 1. A main activity > 2. A search activity > > The search activity is invoked by a search suggestion provider in two > possible ways > > 1. By clicking directly on a suggestion invoking the search activity > through a VIEW action > 2. By clicking on the explicit search icon invoking the activity > through SEARCH action > > If it is invoked through SEARCH I stay on the search activity and show > some text to the user. Now when I click the back button I go back > CORRECTLY to the home page. > > ODD Behaviour: > However if I came to the search activity through the VIEW, I invoke a > browser activity and call finish() on the search activity. Now I have > the browser in my view. If I now go back I would expect to go back to > teh device home page. But from now where the "main activity" is > showing up. > > I see in the logcat a message from ActivityManager indicating > > moveTaskToBack: 8 > > I have tried various flags to invoke the browser activity > the tried flags include > > new task > previous is top > > and I have also tried both a singleTop and otherwise with the > SearchActivity as well. > > Same end result. > > Thanks for your insight on this one > Satya > --~--~---------~--~----~------------~-------~--~----~ You received this message because you are subscribed to the Google Groups "Android Developers" group. To post to this group, send email to android-developers@googlegroups.com To unsubscribe from this group, send email to android-developers+unsubscr...@googlegroups.com For more options, visit this group at http://groups.google.com/group/android-developers?hl=en -~----------~----~----~----~------~----~------~--~---