Skip to main content
  1. Conferences/

Droidcon London

Conference Notes #

Day 1 #

9:00 Keynote - The Long Road @sandromancuso #

“Recruiters are a disease that need to be irradicated”

Jobs specs to weed out the worst NOT to get the best

10:30 RxJava #

MVP: mosby/nucleus

11:30 Gradle Perf (Gradle dev vp) #

  • Single src of truth
  • Ide-> tooling api > gradle
  • –rerun-tasks (runs uptodate tasks again)
  • Gradle test -t (contnious mode)
  • Task.mustrunafter taskB
  • Realease 2.9 gradle wil be much faster. (+40% bigger projects)
  • Config Phase: android plugin is black box for gradle hence no optimization possible by gradle
  • Exp android plugin:
  • Feat.: New software model (service/clien)
  • Mooc: udacity free android gradle course

11:30 Reverse Engineering #

aapt dump strings ….apk -> returns all strings inside app

Basic tools:

  • dex2jar (bad quality)
  • apktool
  • androguard (python based, collection of tools)
  • Santoku (bootable lubuntu based linux env)
  • Radare2
  • Ida pro (disassembla)
  • Jeb2 (Dalvik -> java decompiler)
  • CodeInspect

Security:

Proguard, dexguard, sqlcipher

androguard: python androlyze.py -s -> interactive console to analyse eg. permission usage

Books

12:30 Gradle Plugins #

  • Boring

14:30 Gradle Android Perf tips #

Config Phase

  • Test overhead with –dry-run also –profile
  • –configure-ondemand skips unneded overhead (also in AS)
  • –daemon (extra process) faster builds
  • Use 2.8 gradle + Use 1.8 jdk (ie current vesions)
  • Avoid heavy scripting
  • Dont use + in dep or –offline

Execution Phase

  • Skip dynamic var in builconfig, use resValue instead ( res change is faster than java)
  • Use minsdk 21 + multidex true saves merge phase
  • Large Project: faster when multiple modules
  • –parallel (experimental) needs decoupled proj
  • Incremental javac but does not work yet in android
  • Alternative buck, bazel, pants

15:15 Adv. Concurrency #

  • Weakhashmap dont use literal string && boxed primitive
  • Refernce Api, refernce queue
  • Avoid finalizer use phantom ref + ref queue
  • LeakCanary lib detects leaks in app
  • Prefer Runtime.get().gc()
  • IdentityHashmap uses == instead of equals
  • PendingIntent, messenger, resultreveiver
  • Dont use Eventbus for everything (CyclicBarrier
  • CyclicBarrier

15:15 Animate me - if you dont do it for me, do it for chet #

  • Basic Drawable Animations
  • Interpollators, Drawable Animations
  • Vector Animations: Animate parts and paths
  • CoordinatorLayout
  • Boring

Patrick must see basecamp talks #

  • Gradle performance
  • Genymode +CI
  • Adv. Concurrency
  • Animations tips and tricks

Florian

  • Animations
  • Gradle

Day 2 #

9:00 Keynote - Android for Java Devs (Haase) #

  • Read medium 10 articles “Developing for Android” @chethaase
  • Memory == Perf
  • GC_FOR_ALLOC avoid!
  • Fewer Alloc = faster
  • Avoid alloc in anim, could cause gc (alloc tracker: start anim then alloc tracker, should not alloc stuff)
  • Object pools may be good in Android
  • Array better than list when fixed size
  • Mutalbility saves allocs
  • Foreach allocs iterator even if empty ( in indraw eg)
  • Avoid slow static init
  • Systrace show whats going on ( better in marshmallow)
  • Hardware layer updates (texture during anim, if view hirachy changed)

10:00 Jack & Jill (Eric lafortune) #

  • Jack already used to build aosp sdk
  • Xml > aapt to binary
  • Jack Src to dex
  • Jill class to .jayce
  • Jack includes minification
  • Htfz build time similar like old compiler
  • Optimization on compiler bytecode lvl makes a difference
  • Jack will probably support java 1.8 but lambdas maybe only syntacticalsugar

11:00 ORMs #

  • Kevin (presenter) wrote ormlite
  • GreenDao actually not faster
  • Android getting mature
  • Realm good but not production ready (query on main thread)
  • Src gen slightly faster than reflections
  • Dbflow src gen type usually fastest
  • SugarORm seems to be the worst

11:00 Android Wear #

  • Marshmallow: values-round
  • More Views
  • Ambient mode: setAmbientEnabled only dims display. Only use callback onUpdate
  • Cache all the data
  • Publish: same package name, version number, key
  • Permissions need to be granted before first run
  • Moto360 bad for development (takes too long to deploy)

12:00 Scrolling techniques (cyril mottier) #

  • Complex hirachy for scrollable types
  • Listview scroll listener does not give correct y values
  • OnTouchEvent velocity tracker.obtain()
  • Nested scroll types: one for a axis, bezel scrolling, boundary scrolling ( View.canScrollHorizontally),
  • nested scroll supported nativly on sdk21+ for scrillview, listview, etc
  • Intercepeters

13:45 Power optimization #

  • Display uses 45% power, network 30%, cpu 9%
  • Batching network: alarmManager.setInexactRepeating, SyncAdapter, jobscheduler
  • Persisting connection better than polling
  • AT&T Application Resource Manager
  • Test battery: battery historian 1.0 & 2.0 (phyton script creates report)

13:45 Building Meaningful Motion (Nick Butcher) #

  • Again basic animations…
  • Toolbar can be excluded from the activity transitions
  • animated-selector
  • Choreographer

14:45 Advanced Development with Kotlin (Jake Wharton) #

  • Why new lang? Lang restrictions (util, nullability, verbose), android api (inheritance party, null everywhere)
  • Extension Functions rock! (Add func to existing class)
  • High order functions possible, also in combination with ext func
  • Func as param will not have ref to outer class
  • Ext func expressapis fix bad apis
  • Kotlin has view extension
  • First beta now; going to 1.0 soon
  • No official google support in sight

15:45 Vector Graphics in Android #

  • VectorDrawable partially supports svg (only pathdata)
  • VectorDrawableCompat in future?
  • Can be animated (group)
  • Clip path clips pathdata
  • AnimatedVectorDrawable
  • TrimPathEnd draws percentage of path to animate to look like it gets drawn
  • Objectanimator can animate pathdata (very powerful); must have same number of cmds and cmd types; can transition from eg. Square to triangle
  • Convert vector to png does not support groups
  • Stylingandroid.com find the presentation which is a live app (open sourced) with all the example vector drawables

15:45 Infer - Static Analysis Tool by facebook #

  • Bugs, bugs and bugs
  • For java, c, objective c
  • Checks incremental changes, deep analysis
  • Facebook uses linter & infer
  • Supports gradle, buck, maven, ant
  • 3 phases: capture, analyze, report
  • Capture: creates all possible control flow path
  • Analyze: pre/post conditions
  • Report: CI
  • fbinfer.com / infer –incremental – gradle build
  • Can detect nullpointers, resource leaks (cursor, streams, sockets), acitivty leaks
  • Comming soon: context leaks, array bounds, data flow
  • No AndroidStudio plugin -> CI