Skip to content

Instantly share code, notes, and snippets.

@n0m0r3pa1n
Created April 1, 2017 06:44
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save n0m0r3pa1n/7b57e9090f0da320225acf1aa6890a89 to your computer and use it in GitHub Desktop.
Save n0m0r3pa1n/7b57e9090f0da320225acf1aa6890a89 to your computer and use it in GitHub Desktop.
Android Developer Toolbox - Notes

Gradle

  • Create different build variants which contain different code of your app
    • Internal - for the company. Embed a lot of tools to locate issues easily.
    • Production - only for customers

U+2020 application

A demonstration of integration of different libraries. Read the source code.

IOSched app

The iosched app contains a separate debug screen which is visible only in the internal build.

Example app

Check the mobilization-2016 app for more details.

Measuring tools

Android Monitor tab

Use the monitor tab built in the Android Studio to track different measurements of your app - Cache, network, CPU, GPU etc.

Android Studio Memory Leak Detection

Use the memory profiler to track memory leaks by making HRPOF dumps.

Detect memory leaks which happen in your app.

See what is the frame rate of your app.

Log how much time your methods execution take by using annotations.

Use Pidcat to print the logs of your app. Easy to install and good design.

Track the time needed for dependencies to be provided using Dagger.

Code static analysis tools

Lint

More focused on the Java code than Android Lint.

Continuous integration server. Tells you things like technical debt in days, count of code smells, tests coverage etc.

Error Prone (Google)

Infer (Facebook)

Testing tools

Mock the server

NodeJS + Express

Use to return fake HTTP responses so testing can easily be done.

Associate a domain name to a different IP.

HTTP Debugging

Has debugging options with the option to replace values directly into the received response. Works great with Android. You can also simulate slow connection and repeat queries.

Android State Restoring

Don't keep activities

Option in the Developer options.

Fills the RAM of your phone and the system begins clearing the available apps and later restores them. It is a good tool for QAs.

Android Device Monitor - Stop Process

You can minimize your app by clicking the home button and the stop the process from the device monitor. Then the system will recreate the activities.

Analyzing tools

Developer Options

Show layout bounds

See layout positions and marign

Debug GPU overdraw

Check the view hierarchy you have and optimize it.

Animation Scale

Slow the animations in your app

Screencast + VLC

Make a screencast, open VLC and use the letter "E" to view the transition frame per frame.

UIAutomatorViewer

Browse directly the view hieararchy and pick views by ids.

Decompile APK and check its source code.

Android Studio - Build > Analyze APK

Favorite tools

Connect the phone to the PC and check the view hierarchy on the Chrome browser.

Stetho - Network

Check the requests that happen and the responses received.

Stetho Dumpapp

Communicate with your app through terminal. You can display the content of the received response, the alarm manager scheduled intents etc.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment