Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

Is there a way to show Android Acivity stacks?

Are there any tools for displaying the current task's Activity stack? I'd like to do some debugging, e.g.: check to see if a specific Activity always starts in a new task, and things like that. But i couldn't find any tooling for this.

Thanks

like image 504
Zsombor Erdődy-Nagy Avatar asked Feb 07 '11 22:02

Zsombor Erdődy-Nagy


People also ask

How do I view Backstacks on Android?

1): View->Tool Windows->Android. Then on the left hand side select the System Information Icon and from it's drop down select 'Graphics State'. This will dump show a lot of information, but if you scroll down to 'View hierarchy:' you will see the current stack of views i.e. the 'Back Stack'.

What is Android Activity stack?

A task is a collection of activities that users interact with when trying to do something in your app. These activities are arranged in a stack—the back stack—in the order in which each activity is opened. For example, an email app might have one activity to show a list of new messages.

How do I get my old Android activity back?

In the second activity, the back button at the top left can be used to go back to the previous activity.


1 Answers

I normally run "adb shell dumpsys activity" against the emulator or device, that dumps a whole bunch of info, including the activity stack. Takes a little poking around to understand all the info, but it's there.

If there is a way to get it from DDMS, someone please post it. I haven't run across it yet.

like image 166
mikerowehl Avatar answered Sep 28 '22 02:09

mikerowehl