Tuesday, June 26, 2012

Re: [android-developers] detect if an app is launched

On Tue, Jun 26, 2012 at 8:06 PM, Dianne Hackborn <hackbod@android.com> wrote:
> Note that the only thing listed there that is part of the SDK is
> getRunningAppProcesses().  Using the "top" command is not part of the SDK,
> and you should expect such code to break.
>
> Also both of these are pretty wretched things to do, since they require
> retrieving a parsing a bunch of information.  Beyond that writing code that
> does polling for information is strongly discouraged, using polling to
> retrieve this information is even more undesirable.
>
> The platform deliberately does not provide easy mechanisms to do this,
> because monitoring what the user is doing is not something to encourage.
>  You haven't said why you want to do this, but I would discourage you from
> whatever path you are going down here.
>
>

err... right, I didn't mean to imply that this was encouraged either,
I just didn't want rude comments saying I was wrong in stating it was
impossible to do so. :-)

kris

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

No comments:

Post a Comment