thank you guys, finally it works by overriding the back button, calling goBack() and also calling finish().
@Override public void onBackPressed() { goBack(); //return; }//onBackPressed hector On Aug 13, 12:00 pm, TreKing <treking...@gmail.com> wrote: > On Sat, Aug 13, 2011 at 11:22 AM, hectordu...@yahoo.com < > > hectordu...@yahoo.com> wrote: > > i am trying to also do it form onPause(), onStop() , onDestroy ..... :- > > Well there's your problem. > > I don't know what will actually happen with you doing this, but that seems > wrong. Those methods are already called when the user has backed out, so > calling goBack() (and thus finish()) in them seem like it should be blowing > your stack or ripping the time-space continuum. > > Don't call goBack() in those functions. If you need to set some result > Intent data, do that, but don't call finish(). > > OR, override the back key (see the Android blog for info on this) to stop > the current automatic finish(), then call your goBack() method. > > ------------------------------------------------------------------------------------------------- > TreKing <http://sites.google.com/site/rezmobileapps/treking> - Chicago > transit tracking app for Android-powered devices -- 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