Image for post
Image for post
Illustration by Virginia Poltrack

MAD Skills Kotlin+Jetpack and MotionLayout, AndroidX, Hilt and WorkManager articles, MotionTags screencasts, and an ADB podcast episode on WindowManager

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

NiA33 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


Image for post
Image for post
Illustration by Virginia Poltrack

Kotlin & Jetpack APIs, a new course on Navigation, several articles, and a podcast episode

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

It’s been a few weeks since the previous Now in Android went live, before the holidays — let’s see what’s been happening in the Android universe in the meantime.

NiA32 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…


Image for post
Image for post

It’s all my fault

I’m sorry. I’m soooo sorry. Everything in the country, in society, in the entire universe is in such a terrible state right now, and it seems to just get worse all the time. So on behalf of me, I sincerely and deeply apologize. Because it is clearly my fault.

Let me explain.

The Accident

Way back in 2019 (remember that year? Remember how exciting it was, when we could do things like leave our house, meet friends, or go to work? Oh, those carefree days of our youth), I had a freak biking accident. I’d like to say that I was flying…


The man walked to the bottom of the stairs and yelled up to his wife.

“Honey! I need a present!”

The man’s wife yelled back, “A present? You want me to give you a present?”

He said, “No, I need to give a present. I’m going to this thing and I need to bring a gift. For a baby. Or for his parents. It’s not clear. But I have to get rolling; Bob and Pete are out front waiting for me.”

His wife came to the top of the stairs. She said, “So you want me to suddenly come up…


Image for post
Image for post
Illustration by Virginia Poltrack

Modern Android development content, documentation enhancements, AndroidX releases, articles, and a podcast episode

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

NiA31 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.

Modern Android Development


Image for post
Image for post
Illustration by Virginia Poltrack

Lazy Initialization

In the previous article, I showed how content providers (which show up in an app’s merged manifest file) automatically load some libraries and modules at launch time.

In this article, I will cover the use of the AndroidX App Startup library to have more control over when and how those libraries get loaded. And maybe, just maybe, we’ll see how to save time at app startup along the way.

Auto-Init with the App Startup Library

The simplest way to use App Startup is to implicitly use its content provider to initialize other libraries. You do this by telling App Startup how to initialize these other libraries…


Image for post
Image for post
Illustration by Virginia Poltrack

Of Content Providers and Automatic Initialization

I started playing with the AndroidX App Startup library recently. It reached 1.0 a couple of weeks ago, so I thought it was time to figure out why, when, and how to use it.

The first thing I realized was that its name, App Startup, implies perhaps a bit broader capability than it actually has. The library is not focused on general startup concerns (at least in its current incarnation); it is specifically aimed at minimizing the impact of initialization that happens automatically because of content providers.

Now maybe you’re like me and never thought about how libraries are initialized…


Image for post
Image for post
Illustration by Virginia Poltrack

App Bundles, Material Design Components, new Target API requirements, new fragment and flow docs, and several articles and videos

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

NiA30 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 & Material Design Components


Image for post
Image for post
Illustration by Virginia Poltrack

Testing launch performance can be tricky, but it doesn’t have to be

Shell Command for Testing Startup

I wrote this article to explain more about performance, startup testing, and the reasons behind the pieces I used for testing startup. But if you just want something quick here it is:

  1. Lock the clocks if possible (see far below)
  2. Run this on the command-line (while your device is connected):
$ for i in `seq 1 100`
> do
> adb shell am force-stop com.android.samples.mytest
> sleep 1
> adb shell am start-activity -W -n com.android.samples.mytest/.MainActivity | grep "TotalTime" | cut -d ' ' -f 2
> done

The command above loops 100 times, launching an app, outputting the startup…


Image for post
Image for post
Illustration by Virginia Poltrack

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

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

Chet Haase

Android and comedy. Not necessarily in that order.

Get the Medium app

A button that says 'Download on the App Store', and if clicked it will lead you to the iOS App store
A button that says 'Get it on, Google Play', and if clicked it will lead you to the Google Play store