Kostya, For the opposite activity flow - when the user comes back to "the real" activity and your code discovers that the session expired, start the login activity and call finish() on "the real" one.
There are more than one activity other than login, so if i am on after login i go to activity A then B then C and now let us say session expire and i finish only C, A and B will be still in stack. So it will not work. On Mar 1, 2:17 pm, Kostya Vasilyev <kmans...@gmail.com> wrote: > Manish, > > I would guess that in the case where login is needed, after the user > logs in, you launch "the real" activity for doing whatever requires > login. When you do that, call finish() on the login activity, so it's > not there. > > For the opposite activity flow - when the user comes back to "the real" > activity and your code discovers that the session expired, start the > login activity and call finish() on "the real" one. > > -- Kostya > > 01.03.2011 8:10, Manish Garg пишет: > > > > > > > Hi All, > > > any suggestion? > > > On Feb 28, 3:32 pm, Manish Garg<mannishga...@gmail.com> wrote: > >> Hi, > > >> In my application, I want that my first screen which is login page > >> should not come back after pressing back key. I had set noHistory tag > >> for it. > > >> but now i have one more task to do, if my session has expired, i want > >> to come back to login page and also clear my stack, i am trying > >> FLAG_ACTIVITY_CLEAR_TOP. To do this I have to remove noHistory tag. > > >> Please help me, so that i can achieve both functionality. In normal > >> functioning my application should not be able to traverse back to > >> login page but if session has expired, i want to come back to login > >> page and also clear my stack > > -- > Kostya Vasilyev --http://kmansoft.wordpress.com- 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 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