8

I have a problem that one of my activities is popping out after I think I finished it.

Is there a way to see the stack of the activities?

AlikElzin-kilaka
  • 34,335
  • 35
  • 194
  • 277

1 Answers1

12

1-You can use Hierarchy Viewer within Eclipse.You can see all connected devices and emulators and the activity stack. And in addition in the tree view you can see much more information about the view itself:
enter image description here

2-From the command line, you can use this: adb shell dumpsys activity.This asks the activity manager to print a dump of its current state. The first part of that is the complete activity history, organized by task.
You can see more details here.

Community
  • 1
  • 1
hasanghaforian
  • 13,858
  • 11
  • 76
  • 167
  • 2
    Thanks but I had a problem seeing the data on Eclipse's 'Windows' view. Here are the errors: [2012-07-08 16:48:06 - hierarchyviewer]Unable to get view server version from device 0149A91D0F01C00D [2012-07-08 16:48:06 - hierarchyviewer]Unable to get view server protocol version from device 0149A91D0F01C00D [2012-07-08 16:48:08 - hierarchyviewer]Unable to debug device 0149A91D0F01C00D – AlikElzin-kilaka Jul 08 '12 at 13:49
  • 1
    I see the same "Unable to get view server protocol version from device" error. Anyone know of a fix for this? – swooby Jan 21 '14 at 04:06
  • In case somebody is lost in the output of `dumpsys`, maybe searching for the following string might help you: `Task display areas in top down Z order`. This section shows history of ordered activities. – Michal Vician Mar 23 '23 at 12:35