Hey all, I have an application that has many screens. Is it possible to detect if the screen NOT belonging to the application (not defined in my android manifest) comes into visibility?
A:
onPause()
will be called when an Activity loses focus (to any screen, be it your own or someone elses). When your user launches another activity from your app, you can set a flag when they do so and check for it in onPause()
. If the flag isn't there, you can assume another app has gained focus.
fredley
2010-08-26 15:04:10