Any remote debugger to inspect a running Android app layout? - android

I am looking for a way to inspect an running Android application layout (preferably, by dp/sp), like something as you can see in those Google Chrome/Firefox/Safari live HTML inspector feature.
I have an Android app which needs to follow a strict design guideline and comparing between the guideline and the application itself is quite cumbersome and taking a lot of time to jump around multiple source codes and layout .xml(s) to check a design conformity, so it'd be very efficient to have such debugger.
I should also mention that the app needs specific Android devices to run (unable to run on an simulator or unapproved devices).
Your ideas would be greatly appreciated.
Thank you.

You can test this built-in feature in android studio run the app and after click on the layout inspector "

Related

Can't find my app's full home page in Android Studio Layout Editor

Prerequisites: Got a working app from a friend who needs some changes made. They were outsourcing and now want to internally manage it.
I come from a web and game dev background, so Android/IOS development is new to me, but a lot of the principles seem to be the same.
I got the project onto my device, installed all of the dependencies, and fixed all of the file paths.
The app successfully builds, and I have my virtual Android device running it great!
However, my buddy wants some really simple layout changes, and for the life of me, I can't find where to just edit the home screen layout. I was trying to solve my issue from a web dev approach, by grepping where the logo screen is used in the app, but those files seem to just load a white "background" layer, and not the entire composed page?
I'm missing something really silly here, and I just want to ask a real person on here, instead of digging through documentation and trying to word a condensed question in a Google search.
Here are my condensed questions: How can I just edit the home screen of my app in Android Studio? Where can I find the full home page file to view the entire layout, and not just a fragment?
Edit: The app also utilizes the Flutter SDK, which may explain why I have been having trouble with layout edits. I'm going to look at it again after work today, and hopefully answer my own question. I appreciate the help so far!
Edit 2: After going back to the app with a different approach, I found out my project had defaulted to the "android" sub folder of my master, and wasn't showing any of the Flutter .dart documents. After going up one folder directory, I was finally able to access that Main.Dart file with the display information.
I was able to mount it for inspection, but its saying my emulated device isn't supported. I need to look at it when I have time tonight, and may need to ask a separate question for it. I have my project sdk set to Android 33, and my virtual device is set to Android version 33. I searched around Stack, with a few people with reporting similar issues. I tried following their solutions, but it didn't seem to work.

How can I get the layout xml from webDriver.io for android native app?

I'm using WebDriver.io to create tests.
In the Docs getSource doesn't support native apps.
Get source code of the page. This command won’t work in mobile
environments for native apps. If you are running hybrid tests make
sure that you are in the webview before calling this command.
For now, I use "client.source()" link which return the XML but can take up to 20 sec.
How can I get the layout XML from webDriver.io?
You are doing it the right way. Alternatively you can try the WD.js client and check if performance will be better with than the other one, or simply open an issue report on the WebdriverIO Github page.
The reason of why it may take so long:
UI of the app is constantly updating => Appium is hanging for a bit to retrieve it;
Lots of elements on your app page => leads to a big .xml file.

Build Chrome for Android

My original post was about one month ago. Looks like Google has really cleaned it up and made the basic features upstream. With the help of Nikolay's comment, I was able to build the contenttest shell and chromium test shell. However the chromium test shell looks exactly like the content shell. It basically has an address bar and back/forward button. That's it.
I am still trying to find my ways in this giant project. But my understanding is that Chromium should be a fully functional browser including the basic UIs such as menus, bookmarks, etc (just like Firefox). Chrome is Google's flavor with their own Google specific services. But Chromium should has the basic features as a fully functional browser. So is it the right understanding? If so, why Android port is not? Anybody knows that if there is the full UI code for Android in Chromium? If not, is it coming or it will be like this going forward? Any other open source project that can be used to add a basic full browser UI to chromium for Android?
There is no Chromium build for Android. As of right now the closest you are going to get is to build the ContentShell described in https://code.google.com/p/chromium/wiki/AndroidBuildInstructions - content shell gives you a lot of the browser that you need, however not all of it.

Custom Android MMS/SMS application from source code?

Okay here's the deal:
I want to download the full source of the MMS/SMS application that ships with Android phones. I want to be able to modify it, and add a little custom functionality to it.
I am developing using Eclipse, and I'm on Windows 7. I have noticed that there is now a Git for Windows, but I am pretty lost in it and not sure how to integrate everything with Eclipse.
Basically, I want to just get it to the point where I have all the source code visible in Eclipse and be able to see the app run JUST like the built-in texting/MMS app that is already on my phone. Then I'll know that I can modify it and proceed.
Any ideas?
Thanks!
There's a mirror of the SMS/MMS app on GitHub here. Just import that to Eclipse and customise away.
Unless you want to customize and use it only on your own phone (without publishing), this is not a good idea. This is because it uses classes that are hidden from the sdk. By default you won't even be able to build the apk via eclipse, but there is a way. The reason why this is a bad idea is that the hidden apis are not guaranteed to remain the same through different api-levels and your app can stop working with the next android update, and might also not work on previous api-levels. In-fact your app might not even work on selected phones running the same api-level.

Android Usability Testing Setup (ddms, screenshots, touchevent)

im thinking of an easy-to-use android usability testing tool, that will allow the user to record and log relevant information during app testing. As a first result i would like to have a screenshot taken each time the user interacts with the touchscreens where the position, duration and type of the touch event is shown.
As android does not allow me to take screenshots easily and as its not possible to log touchevents from an service here are my questions:
Does Logcat give me any information about TouchEvents (I tried but i couldt produce any touch-Logs)
Is it possible to evoke the ddms-Screenshot-action from terminal? (./ddms -takescreenshot)
Does Logcat give me any information about TouchEvents (I tried but i couldt produce any touch-Logs)
No.
Is it possible to evoke the ddms-Screenshot-action from terminal? (./ddms -takescreenshot)
Not via the ddms command AFAIK. Either use monkeyrunner (as another answer suggested), or write your own code to the JAR file that DDMS uses. I used that to create a software projector; another developer extended that concept.
If you are looking to automate these things, you can use the Monkey Runner tool, it specifically has a call to take screen shots automatically.
http://developer.android.com/guide/developing/tools/monkeyrunner_concepts.html
It specifically runs Python scripts, that you would use to design an automated regression test.

Categories

Resources