Is there a way to see the stack activity of my own application?
Asked
Active
Viewed 246 times
2 Answers
3
type this in the command line:
adb shell dumpsys activity
or
adb shell dumpsys activity activities
(second one gives a shorter stack)

Community
- 1
- 1

Rachel Gallen
- 27,943
- 21
- 72
- 81
-
i dont have that command line "adb" on my terminal,ok its on my platform tools dossier – Damiii May 25 '13 at 16:32
-
@Damiii you don't have means you don't know hw to access it or its nt there – MDMalik May 25 '13 at 16:35
-
i saw where it is now,and did the command above: and i'm little confused with all these lines – Damiii May 25 '13 at 16:38
-
@Damiii all those lines are your activity! – Rachel Gallen May 25 '13 at 16:40
-
if you add activities at the end of the line you'll get a shorter stack – Rachel Gallen May 25 '13 at 16:40
-
hummm, i only see one activity of my application – Damiii May 25 '13 at 16:48
-
@Damiii with the second one? maybe stick with the first if you're just building it – Rachel Gallen May 25 '13 at 16:49
-
i did the first one, how do i know if is doing a push or a pop ? – Damiii May 25 '13 at 16:53
-
maybe set alwaysretaintaskstate to true http://developer.android.com/guide/topics/manifest/activity-element.html#always – Rachel Gallen May 25 '13 at 16:53
-
i don't know about the push/pop i'm afraid – Rachel Gallen May 25 '13 at 16:55
-
oh :/ i thought i could see the stack activity in real time :) – Damiii May 25 '13 at 16:59
-
http://androidcodeexamples.blogspot.ie/2012/08/multiple-android-activities-in.html – Rachel Gallen May 25 '13 at 17:02
1
I think what you need is Hierarchy Viewer.
You can see the Activity
stack in Hierarchy Viewer.

bakriOnFire
- 2,685
- 1
- 15
- 27
-
it is saying "ViewServerDevice]Unable to debug device: samsung-gt_i9505-4807291a" :/ – Damiii May 25 '13 at 16:42
-
-
so now..whats' the problem?..can u see the activity stack?..just try to run your app and check.. – bakriOnFire May 25 '13 at 17:03
-
"HierarchyViewer does not work on user builds (i.e. with devices available in stores.) This is for security reasons. If HiearchyViewer was able to work on user builds, any application on your desktop (or even on the phone in some cases) could potentially get access to private information (like logins and passwords.)" – Damiii May 25 '13 at 17:04
-
yes i did run, and it wasn't showing. Maybe due to that error "Unable to get view server protocol version from device" – Damiii May 25 '13 at 17:05