[android-developers] Detecting exit and open of an app with multiple activities

2012-01-18 Thread TonyD
Hi All, Is there a proper way to detect when someone leaves your application (hits the home button or opens a new application from the notifications bar ... basically the app leaves the foreground) or when someone enters your application (after hitting the home button). I have multiple

Re: [android-developers] Detecting exit and open of an app with multiple activities

2012-01-18 Thread Mark Murphy
You can use onUserLeaveHint() to detect when a user is leaving your activity in a way that might suggest they are leaving the whole app, but it doesn't cover everything (e.g., incoming phone calls). I know of no equivalent for the return path. More importantly, what you are proposing is a code