Skip to content

Instantly share code, notes, and snippets.

Avatar

Fabien Devos fabiendevos

  • Wealthfront
View GitHub Profile
@fabiendevos
fabiendevos / YourCode.java
Last active Oct 26, 2015
Generating constants for all flavors (type-safe, unlike using a string)
View YourCode.java
if (BuildConfig.FLAVOR.equals(BuildConfig.FLAVOR_YOURFLAVOR)) {
// do something
}
View method-tracing-android
Debug.startMethodTracing("filename");
// code to trace
Debug.stopMethodTracing();
Then
adb pull /sdcard/filename.trace /tmp
traceview// code to trace
Debug.stopMethodTracing();