On Thu, Aug 5, 2010 at 9:06 AM, Jin Chiu <[email protected]> wrote:

> I would like to get notified when the user has switched to another
> application.
>

Out of curiosity, why?


> In this case, onStop() in MyActivityA does not suffice as that will also
> get invoked if the user navigates to another screen within my app.
>

Maybe set a flag indicating that you've launched a new activity yourself, so
onStop if your flag is set, it was you. If not, the user switched using
other means. Yes, this is a hack and will probably break in subtle ways.
Good luck.

-------------------------------------------------------------------------------------------------
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 [email protected]
To unsubscribe from this group, send email to
[email protected]
For more options, visit this group at
http://groups.google.com/group/android-developers?hl=en

Reply via email to