> Does anyone know how to, or if it's even possible to check the
> (foreground process/top of the activity stack) from a service?

It is possible, see the ActivityManager class functions like
getRunningAppProcesses().
getRunningTasks() looks useful but is flakey in my experience e.g.
when you
return to the launcher it is sometimes not updated.

Pent

-- 
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