Illustration by Virginia Poltrack

Now in Android #29

App Bundles, AndroidX stable releases, Kotlin articles and videos, and a new ADB podcast episode

Chet Haase
Android Developers
Published in
6 min readNov 11, 2020

--

Welcome to Now in Android, your ongoing guide to what’s new and notable in the world of Android development.

NiA29 in Video and Podcast Form

This Now in Android is also offered in video and podcast form. It’s the same content, but with less reading required. The article version (keep reading!) is still the place to come for links to all of the content that’s covered.

Video

Podcast

Click on the link below, or just subscribe to the podcast in your favorite client app.

MAD Skills: App Bundles

The MAD Skills series continues to roll on, with technical content about modern Android development. and have posted a few episodes in the second series on App Bundles. So far, we’ve seen content on Play App Signing, Building your First App Bundle, and Play Feature Delivery. Check out the videos and articles below below to learn more.

Episode 1: Everything to know about Play App Signing

In a series about Android App Bundles, it’s natural to talk about app signing, because Play generates APKs for download to user devices, and those APKs have to be signed in order to be installed. This video walks you through the steps to enable signing for an app on the Play Console, including options for having a key generated by Google or uploading your own key.

Be sure to check out ’s related article on common questions about Play App Signing:

Episode 2: Building your first app bundle

’s video walks you through the steps of creating an App Bundle, which you can do either in Android Studio or on the command line, followed by uploading it to the Play Console. He also shows how to use tools in Play Console to explore information about the uploaded bundle.

Episode 3: Configuring your App for Play Feature Delivery

This episode shows how to use Android Studio to modularize your application, and how to select modules to be downloaded at install time (with optional conditions determining whether to install or not) or on demand. also goes into some detail on how to use the APIs to request on-demand module installation.

Or in article form:

Episode 4: Testing with bundletool and Play Console

In this final episode, explains how to use the available tools to test your bundle and resulting APKs, including bundletool for local testing as well as Play Console for testing uploads.

There are several articles and docs linked from the video description, be suree to check those out for even more info on the topic.

Stay tuned for the final App Bundles content next week, when we will host a live Q&A next Thursday (a YouTube live link will appear in the playlist by then, plus we’ll tweet out a call for questions before then).

For ongoing content, be sure to check the MAD Skills playlist on YouTube, the articles on Medium, or this handy landing page that points to all of it. The next series begins next week: stay tuned!

AndroidX

Amidst the plethora of incremental alpha, beta, and RC releases of AndroidX libraries, there were some important stable versions launched recently that I wanted to call your attention to.

  • ConstraintLayout 2.0.4: The most important change here was actually in version 2.0.2 (also recent), which had important performance optimizations. But pick up the latest version for the extra bugfixes since then.
    The performance gains come from ConstraintLayout’s being much smarter about when it can skip running the solver and avoid multiple measurement and solver passes. This allows for big performance wins in many common situations. For example, hierarchies with tons of GONE views and views using match constraint (layout_[height|width]=”0dp”) can be significantly faster to layout.
  • Startup 1.0.0: The app startup library was developed to make it easier for apps to initialize components at startup in a more optimal way than they might be doing otherwise. It turns out that initializing a single ContentProvider takes a significant amount of time, and many apps initialize more than one of them — often many more of them. Startup allows your app to initialize components without creating several ContentProviders (spoiler: the library creates and uses a single ContentProvider under the hood for all requests), allowing your app to skip most of that overhead.
  • Tracing 1.0.0: This library writes trace events to the system trace buffer. Instrumenting your app with trace events can be used to provide enhanced information about performance that you can then see by using the Perfetto tool (or Systrace on older devices). See the guide on system tracing for more details on how to do this.
    This “new” library isn’t providing new functionality, per se, but it’s providing functionality from the existing TraceCompat class in a very targeted way so that you don’t have to pull in all of androidx.core for this limited functionality. There’s also a helpful KTX extension function which makes it simple to add tracing around a given block of code.

Articles & Videos: Kotlin, Kotlin, Kotlin, and Kotlin

We don’t always talk about Kotlin, but when we do, we talk a lot. There were several articles and videos posted about Kotlin recently:

Classy Data

added another episode in the ongoing Kotlin Vocabulary series, this time about Kotlin data classes. Data classes allow you to easily create a structure for holding data with less boilerplate code, while relying on Kotlin to automatically generate appropriate equals() and hashCode() functions. You also get destructuring for the class’s properties out of the box, along with copy(). As usual for Kotlin Vocabulary episodes, Florina explores the decompiled bytecode for data classes to explain how it all works under the hood.

Or in article form:

Built-in Delegates

Speaking of Kotlin Vocabulary, posted a sequel to his earlier article on Kotlin’s delegate feature. This time, he discusses the delegates provided by the Kotlin Standard Library: lazy, observable, vetoable, and notNull.

Should I Learn Kotlin for Android? (and Other FAQs)

The short answer is… Yes!

But for a longer explanation, posted this article to answer some of the top questions we get from developers about investing in Kotlin education and development, and includes links to important learning resources.

Fewer Crashes and More Stability with Kotlin

In this article, discusses some of the reasons why Kotlin apps are less error-prone than apps not written in Kotlin. She points out some specific apps and use cases which back up this assertion, but also discusses some of the reasons why this language allows for more robust code, including nullability, hashCode() != equals(), and more. Check out the post for all of the details.

Podcast Episodes

There’s been another episode of Android Developers Backstage posted since the last Now in Android. Check it out at the link below, or in your favorite podcast client:

ADB 152: Image Loading with Coil

, and I talked with Colin White from Instacart about his open source image loading library, Coil. We chat about image loading, performance, open source, and the use of Kotlin and coroutines to make this Kotlin-first library.

Now then…

That’s it for this time. So go learn about App Bundles! Download the latest AndroidX releases! Read recent articles about Kotlin! Listen to the latest ADB podcast episode! And come back here soon for the next update from the Android developer universe.

--

--

Chet Haase
Android Developers

Past: Android development Present: Student, comedy writer Future: ???