droidcon Berlin 2021: impressions and trends
Last month three Android engineers from Freeletics went to the first in a long time in-person conference - droidcon Berlin 2021. The conference was packed with interesting topics, this blog post is just a snapshot of topics we were most interested in.
Full content of the conference can be found here, all the talks have been recorded and can be found here.
About the conference
droidcon Berlin is one of the oldest Android conferences in the world making its first appearance in 2009 only 1 year after Android 1.0 was released. The conference is known for attracting some of the most famous people in the Android community in Europe and worldwide, such as private contributors, Google Developer Experts, Kotlin experts, engineers from Google. What was great, is that participants were able to propose their own topics for the 3rd day of the conference, which was focused on the community. Topics and panel discussions for that day were chosen by popular vote.
Keynote speaker - Chet Haase
Chet is one of the early engineers on the Android project, having joined the project in 2010 just 2 years after Android 1.0. He has been mostly working on and leading the UI Toolkit team at Google and is probably most known in the community as a host of Android Developers Backstage podcast.
In his keynote presentation, Chet took a dive into the history of Android as a software project outlining challenges the team had to face in the early stages. The team had to pivot from the initial idea of building a software platform for cameras, push the idea through with the VCs and face a vigorous competition on the market at the time (Symbian OS, Blackberry RIM, later iPhone).
One of the key reasons for success was having a long-term vision for the product, according to Chet. In the end the project managed to succeed and Android became the most widespread mobile platform running on more than 3 billion devices today, giving millions of developers (including us) room for creativity.
The main trend in Android development in 2021- (surprise, surprise) Jetpack Compose
Earlier this year Jetpack Compose reached its official 1.0 production release status. Jetpack Compose is a new approach to defining UI elements on Android in a declarative way (similar to SwiftUI on Apple devices). UI elements can be represented as Composable Kotlin functions as opposed to using XML text files, the approach that was predominantly used before since the inception of Android.
Naturally a 2021 Android conference was dominated by Compose-related topics, ranging from migration stories with gotchas when adopting Compose, state management and interoperability to deep dives into the internals of Compose covering rendering model with group slots, snapshots and testing.
Surprisingly, not that many companies are using Compose in their production environment, according to the data from the “most” reliable source - a vote by show of hands in the room. For us though, every new screen we’ve shiped since the release of Jetpack Compose has been built using Compose, which is something we can be proud of.
Kotlin Flows
Flows, despite being cold, have been a hot topic for a while now. Many Android developers are using Jetpacks LiveData these days, to handle UI updates in a lifecycle aware way. Now Flows are the new thing that everyone talks about. But are they an easy drop-in replacement for LiveData? This question is answered by Fatih Giris’ talk Using Kotlin Flow in MVVM. In his talk, Fatih shows step by step how we can replace LiveData with Flows and which caveats are waiting for us. He details the differences between both technologies and shows how Flows can be made lifecycle aware (Spoiler: They aren’t by default). He offers a way to slowly migrate, by using LiveData and Flow together, before removing LiveData completely. To top it off, he shows how to easily write UnitTests when using Flows. You can check out his slides here or his Medium article about the talk here.
Annotation Processors
A personal highlight for us was the talk Your own Annotation Processor by Gabriel Samojlo. Annotation Processors is the topic most Android developers have heard about, but not everyone is familiar with how they work, not to mention how to build one. In short, an Annotation Processor scans the code for Annotations (e.g. @Singleton) in order to process the annotated code and do something with it. In many cases this mechanism is used to auto-generate code, which is very convenient for developers because it reduces boilerplate code and saves development time. And this is exactly what Gabriel impressively demonstrated in his 40 min talk, by showing a hands-on example on how to implement a simple Annotation Processor, which generates “kotlinx.serializable” data models just by adding one annotation to it. If you want to check out this example for yourself, head over to his Github page, where he provides the source code for this talk.
Scaling an Android app
There were plenty of talks that addressed classical Software Engineering challenges. How should the app architecture evolve when the team is going through a rapid growth phase in a way that multiple teams are able to work independently? Engineers from Zalando gave an overview of their app architecture evolution in such a phase showing interesting insights into how their gradle setup evolved over time.
Assuring multiple teams work together in a productive way goes hand in hand with build and release automations. Naturally, there has been no shortage of CI/CD related topics. The one that we found the most interesting was the talk from Ubiratan Soares where he demonstrated how easy it is to work with GitHub actions to configure daily Android workflows.
Wrap up
Overall we had a great time in Berlin and enjoyed the conference. Even though most of the conferences nowadays can be streamed or watched later from home, it’s nice to see fellow Android developers from other companies in person and stumble upon old colleagues.
Going to an in-person conference is definitely one of the best ways to get yourself familiar with the tech scene in Germany and in Europe, which is especially important for those of us relatively new here. Listening to conference talks can be a good first push to start on a learning path of a topic that has long been in some old dusty TODO list.