Chrome DevTools + Android = <3
Stetho
Olá!
Rodrigo DireitoFelippe Bisca@phelpzz @stik3nd
Android Dev at 99 Android Dev at 99
O que é?
"A debug bridge for Android applications"
Permite aos desenvolvedores Android o acesso ao Chrome Developer Tools
Configuração
…app_module/build.gradle
dependencies { compile 'com.facebook.stetho:stetho:1.4.1' }
Application
Stetho.initializeWithDefaults(this);
Configuração
chrome://inspect
Features
! View Hierarchy
! Network Inspection
! Database/Shared Preferences Inspection
! dumpapp
View Hierarchy• View highlighting • Tap to jump • View properties • <fragment> instances virtually placed in the hierarchy
Features
! View Hierarchy
! Network Inspection
! Database/Shared Preferences Inspection
! dumpapp
Network Inspection
dependencies { compile 'com.facebook.stetho:stetho-okhttp:1.4.1' }
ou,
dependencies { compile 'com.facebook.stetho:stetho-urlconnection:1.4.1' }
Network Inspection
OkHttp 2.x
OkHttpClient client = new OkHttpClient(); client.networkInterceptors().add(new StethoInterceptor());
OkHttp 3.x
new OkHttpClient.Builder() .addNetworkInterceptor(new StethoInterceptor()) .build();
Network Inspection• Image preview • JSON response • Export to HAR format
Features
! View Hierarchy
! Network Inspection
! Database/Shared Preferences Inspection
! dumpapp
Database/Shared Preferences Inspection• Read/Write SQLite databases
Features
! View Hierarchy
! Network Inspection
! Database/Shared Preferences Inspection
! dumpapp
dumpapp• Command-line interface • Default set of plugins • Extensible - You may create your own
Features
! View Hierarchy
! Network Inspection
! Database/Shared Preferences Inspection
! dumpapp
Obrigado! Perguntas?
Rodrigo DireitoFelippe Bisca
https://github.com/FBisca/stetho-demoProjeto:
@phelpzz @stik3ndAndroid Dev at 99 Android Dev at 99