Please don't do this, these APIs are only really for writing system
information tools.  For example, for this to work correctly need to retrieve
-all- possible running activities (which can be 10, 20, 30, or more), have
all of that information copied to your process, and look through it for the
activity you are interested in.

If your code is in a service a good way to do this is to just have the
activity tell the service when it is resumed.

On Thu, Feb 12, 2009 at 6:50 PM, Dan Raaka <[email protected]> wrote:

>
> Get the RunningTaskInfo through the ActivityManager
> and do a name match for the activity name you want to exclude and send
> the notification
>
> -Dan
>
> On Feb 12, 5:34 pm, pperotti <[email protected]> wrote:
> > Hi, does anybody knows if it is possible to check if an Activity is at
> > a moment of the time visible ?
> >
> > My question is because I want to implement a service and only invoke a
> > different activity (by launching an Intent) only if the previous
> > activity was visible. In case for instance, the user is in a different
> > application I just want to send a notification.
> >
> > My problem is that I dont know how to determine if my application is
> > being use at a particular time, so, I can properly move to the user to
> > the right screen.
> >
> > Thanks !
> > Pablo
> >
>


-- 
Dianne Hackborn
Android framework engineer
[email protected]

Note: please don't send private questions to me, as I don't have time to
provide private support.  All such questions should be posted on public
forums, where I and others can see and answer them.

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