Two Tech Talks From Twitter Android Team
Watched two Android talks from Twitter today, one is about gradle and one about Vine.
Building Twitter for Android with Gradle
(by Jonathan Le – https://twitter.com/jle)
The gradle one was short, mostly about the migration process of twitter Android team. Some interesting points from the talk:
Twitter app version
- 1.0: 1 committers, Ant, build time 30s
- 4.0: 15 committers, Ant+Ivy, build time 2min
- 5.0: 80 committers, Gradle, build time 24s
Gradle process
- setup private Sonatype Nexus repo
- publish aars to nexus
Should not use git submodules
- The talk did not include more detail of this…
Building Vine on Android
(by Sara Haider – https://twitter.com/pandemona)
Finally have time to watch the whole video, very nice talk, included many technical tricks of building vine app. Some tricks remind me the time I was working on ActionSnap.
Playback tricks
- Use MediaPlayer, TextureView(api 14) to play the video
- Autoplay, prefetch 2 videos
- MediaPlay.setLooping(true) is too slow. Early seek to improve the loop behavior
Recording
- MediaRecorder has 700ms delay on start,stop
- use PreviewFrame to get images and record audio (wat?)
- need compare timestamp to synchronize audio/video
- use ~140MB memory for full 6 second cut
- largeHeap = true (of coz)
- separate process to get more memory
Cusor
- hybrid cursor
- backed by ArrayList (?)
- update list view and write to db in the bg
Crash tracking
- Crashlytics
- real time, tonnes of metadata
- zero unknown crashes #adore#
Span
- bug on emoji
The f-word – fragmentation
- Device specific hack
- samsung s4 front facing camera strange aspect ratios
- htc not support multiple MediaPlayers at once
- Kindle (dumb)
- Default camera not always back camera