In each RunningTaskInfo, you can find its respective top activity by:
ComponentName top = task.topActivity;

But you are right, in Android system, there are multiple tasks/processes
running at any given time.
And telephony related tasks/services/processes will be given the highest
priority.

If you can find the launch date/time info. of a particular task/activity,
that might help.
But I guess you can only find that by "adb shell sysdump activity".

You might be able to build a native .so lib to call this and dump into a txt
file and JNI hook back to your Java codes to analyze the contents later, but
seems it's pretty hairy :)

On Fri, Aug 28, 2009 at 2:43 PM, Chris Stratton <cs07...@gmail.com> wrote:

>
> On Aug 28, 1:45 pm, Hong <lordh...@gmail.com> wrote:
> > You can use ActivityManager to query list of running tasks
> > (getRunningTasks(int))
>
> Hi Hong.  Yes, I found I could do this, but it was not usefully
> specific.  Even when I looked at the priority to select only those
> with the priority that means they are interactive, I found that for
> example the in call screen keeps this while on a call, even when it's
> not the displayed window.  And I also found that the input method
> (latin, etc) would show up as  interactive priority, but couldn't
> determine who it was working for in order to find out what window was
> showing.
>
> It may be possible to look at the total list of what has interactive
> priority and figure out what is showing most of the time by comparing
> its habits to the rest of the items on the list, but it's going to be
> complicated and to some degree guesswork that may fail when new
> applications that behave in new ways are added to the system.
>
>
>
>
> >
>

--~--~---------~--~----~------------~-------~--~----~
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-unsubscr...@googlegroups.com
For more options, visit this group at
http://groups.google.com/group/android-developers?hl=en
-~----------~----~----~----~------~----~------~--~---

Reply via email to