4

I need to find out the activity name / package name for the top most visible window. I am aware of activity manager API to find out top most activity using get running tasks API, but that is not what I am looking for. It may give activity name which might have hidden or invisible dialog.

So in my case, the top most running task is some invisible dialog. But what is actually visible on the device and accepting input is the second running task.

When I use hierarchy viewer, it knows what is the top most visible window displayed having a focus and it highlights that in bold. So I need to find the same information.

Thanks in advance.

4

0 回答 0