0

I have an application through which user gets logged in during the first time,then he remains logged in.... Since my application contains chat in it,so the user needs to be logged in while in application... but i want to perform logout when application is in background...SO how to do this?

coderslay
  • 13,960
  • 31
  • 73
  • 121

1 Answers1

2

override onPause() method if you want to logout user each time chat activity goes to background.

Vladimir Ivanov
  • 42,730
  • 18
  • 77
  • 103
  • 1
    don't forget to check stuff from OnCreate() and OnResume() – Dr.J Apr 21 '11 at 07:11
  • After Logging in i move across various activities.. so if i logout when onPause of 1 activity is called then there will be problem in another activity... The problem is that i have many activities.... – coderslay Apr 21 '11 at 08:29