"hierarchyviewer" is one tool present in the the SDK that gives the hierarchy of views present in the current visible window, that is working on the simulator or I think needs root permission on actual device to work.
After studding it I get to know that after opening "hierarchyviewer" it starts a service named "window" and does some port forwarding to communicate with it through sockets. This is what I have done: 1) Open emulator and some screen having view components e.g. Settings 2) open "hierarchyviewer" 3) Open DOS (I am using windows) enter the command: "telnet localhost 4939" 4) When telnet connection gets established enter: "DEBUG ffffff" NOTE: telnet connection will get establish only when hierarchyviewer is open (I dont know why). 5) After this I am getting all the properties of all components in the screen. eg. the properties of one component i.e. title bar of setting window is: -------------------------------------------------------------------------------------------------------------------------------------------- android.widget.TextView@40 514918 mText=8,Settings getEllipsize()=3,END text:getSelectionEnd()=2,-1 text:ge tSelectionStart()=2,-1 measurement:mMinWidth=1,0 padding:mPaddingBottom=1,0 padd ing:mPaddingLeft=1,0 padding:mPaddingRight=1,0 padding:mPaddingTop=1,0 measureme nt:mMinHeight=1,0 measurement:mMeasuredWidth=3,234 measurement:mMeasuredHeight=2 ,17 layout:mLeft=1,3 mPrivateFlags_DRAWING_CACHE_INVALID=3,0x0 mPrivateFlags_DRA WN=4,0x20 mPrivateFlags=8,16779312 mID=8,id/title layout:mRight=3,237 scrolling: mScrollX=1,0 scrolling:mScrollY=1,0 layout:mTop=1,1 layout:mBottom=2,18 padding: mUserPaddingBottom=1,0 padding:mUserPaddingRight=1,0 mViewFlags=9,402657280 layo ut:getBaseline()=2,12 getFilterTouchesWhenObscured()=5,false layout:getHeight()= 2,17 layout:layout_bottomMargin=1,0 layout:layout_leftMargin=1,0 layout:layout_r ightMargin=1,0 layout:layout_topMargin=1,0 layout:layout_height=12,MATCH_PARENT layout:layout_width=12,MATCH_PARENT getTag()=4,null getVisibility()=7,VISIBLE la yout:getWidth()=3,234 focus:hasFocus()=5,false isClickable()=5,false drawing:isD rawingCacheEnabled()=5,false isEnabled()=4,true focus:isFocusable()=5,false isFo cusableInTouchMode()=5,false focus:isFocused()=5,false isHapticFeedbackEnabled() =4,true isInTouchMode()=4,true drawing:isOpaque()=5,false isSelected()=5,false i sSoundEffectsEnabled()=4,true drawing:willNotCacheDrawing()=5,false drawing:will NotDraw()=5,false -------------------------------------------------------------------------------------------------------------------------------------------- here mText=8,Settings in second line shows the text property of this TextView This is actually what I need but the problem is speed this "DUMP ffffffff" command gives the output very slow. What I want to create is Screen flow in: e.g. For Settings Settings |------------> Wireless & networks | |------------->Airplane Mode | |------------->Wi-Fi | |------------->Wi-Fi settings | | |------------->Wi- Fi | | |------------- >Network notification | | |------------->Add Wi-Fi network | | : | | : | |------------->Bluetooth settings | |------------->VPN settings | : | : |------------> Call Settings | |------------->Fixed Dialing Numbers | |------------->Voice mail service | |------------->Voice mail settings | : | : |------------> Sound | |--------------> : | : |------------>Display : : Now I am facing following problems will someone please help me in those: 1) Data comming from "DEBUG ffffffff" command is slow and telnet connection does not gets connected without opening hierarchy viewer. 2) what are the services provided by command "service call window" inside android shell and how can I use them either through command line or programatic way? 3) If I will create a Deamon or background service, How can I get the same data or similar data which will help me creating screen flow? 4) If possible then how can I use android.app.ActivityManager.RunningTaskInfo.topActivity or Context.getSystemService(Context.WINDOW_SERVICE) to create Screen flow as shown above. 5) Can I somehow use "dumpsys window" command to get my desired data? 6) How can I access "Activity stack"(Back stack) directly which holds activities in background (if needed)? 7) If possible please suggest any other way or solution to create the screen flow as shown above. -- 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