[android-developers] Re: How to check the Foreground Process from a Service
> 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 android-developers@googlegroups.com
To unsubscribe from this group, send email to
android-developers+unsubscribe@googlegroups.com
For more options, visit this group at
http://groups.google.com/group/android-developers?hl=en
0 Comments:
Post a Comment
Subscribe to Post Comments [Atom]
<< Home