Now in Android #22
Android 11 Beta 2, AndroidX, articles and videos, the Android Studio AMA, training, #11WeeksOfAndroid, Android 11 online meetups, and more ADB podcasts
Welcome to Now in Android, your ongoing guide to what’s new and notable in the world of Android development.
Wow, so much content posted since the last episode. I think the real name for 11 Weeks of Android should be “A Year’s Worth of Content released in 11 Weeks.” It’s not as catchy, but it seems more honest.
NiA22 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.
Click on the link below, or just subscribe to the podcast in your favorite client app.
Now in Android: 22 - Android 11 Beta 2, AndroidX, articles, videos, training, and more!
Welcome to Now in Android, your ongoing guide to what's new and notable in the world of Android development. In this…
Android 11 Beta 2: Platform Stability
The Android 11 release just hit Beta2, also called Platform Stability. This new release milestone means that the APIs and behaviors are locked and there will not be any other compatibility changes through the final release. So now is a really good time to test your app and see how it’s going to behave on Android 11 devices.
There were several libraries released in various stages, from Compose releasing dev15 to a couple of libraries hitting stable. Most of these were bugfix releases, or intermediate releases on the way to stable. but I wanted to call your attention to a couple of AndroidX developments in particular:
WorkManager 2.4: Besides many bugfixes, this release also has some important new functionality, including:
- Support for RxJava 3
- A new WorkQuery API so you can find out what’s up with your WorkInfo requests
- Diagnostic info to give you metrics on how things have been going
AndroidX is on Github!
Alan Viverette posted an article about AndroidX now being available on GitHub. This was a longstanding request from the community that is… difficult to handle. We use completely different infrastructure internally and can’t change that due to many factors (that you don’t care about). But we know that most users are familiar with the GitHub workflow, not AOSP+Gerrit, so we have started to make some of the AndroidX libraries available through Github as well.
It’s early days, and only a small subset (Room and WorkManager) is available for contributions so far. But it’s an important start. Read the article for all of the details.
Articles & Videos
The Game Show
Introducing Android Performance Tuner covers the new tool in the Games SDK that let’s you see detailed information about the performance of your app on your users’ devices, all inside of Android Vitals in the Play Console.
Play Asset Delivery talks about the ability to deliver the right assets at the right time to your users’ devices.
Check out these shows above, follow the playlist, and look for more content soon.
Building Apps for Work Profiles
Are you building an app that your users may use in a work profile on enterprise devices?
Aser Samak posted this video with some best practices to make your app work well in work profiles.
But I Want it Now!
You’re probably familiar with WorkManager as an API that can help you run deferred jobs. But there’s new functionality in the library that also makes it helpful for running jobs now.
Ben Weiss posted this article on using WorkManager for long-running tasks that should be executed immediately:
IOSched + Hilt
Besides all of the great Hilt content called out in the #11WeeksOfAndroid links (below), there was also an article published by Jose Alcérreca that covers the details of what the team did to migrate the IOSched app from using Dagger to using Hilt instead. IOSched is the application we develop (and open-source) as both an event scheduling app (for Google I/O and the Android Developer Summit) and a sample app for developers to see how to use various Android technologies and best practices.
The previous version of IOSched used Dagger for depending injection. The team migrated it to use Hilt instead. I’ll let you read the article for the details and advantages. (Spoiler alert: they were able to delete many more lines of code (2000) than they added (500)… and it wasn’t just by writing longer lines.
Migrating the Google I/O app to Hilt
Hilt is the new library built on top of Dagger that simplifies Dependency Injection (DI) in Android apps. But, how much…
LiveData + Coroutines
Jose also wrote up an article based on the talk that he gave with Yigit Boyar at last year’s Android Developer Summit. It’s a three-parter, so buckle up and read them all. Or maybe you can use Coroutines and Flow to read them asynchronously. Start with Part 1:
New Course: Android Basics in Kotlin
We launched the Android Basics in Kotlin course recently, giving people without any prior programming experience a chance to learn both Android and Kotlin development at the same time.
Android Basics in Kotlin course | Android Developers
Welcome to Android Basics in Kotlin! In this five-unit course, you learn the basics of building Android apps with the…
We also launched a couple of new Pathways to help you get up to speed on important language features.
Coroutines: Coroutines are the recommended approach to asynchronous programming in Android. If you’re not using them yet, maybe some training will help. This pathway helps point you in the right direction, with codelabs and articles.
Use coroutines in common Android use cases | Android Developers
Use coroutines to simplify background task management for common use cases such as making network calls and accessing…
Kotlin for Java Developers: Are you a Java developer trying to understand how to write in Kotlin, or how to add Kotlin code to your existing Java project? This pathway will help, with codelabs and articles specifically targeted at Kotlin+Java interop and migration.
This Thursday, July 30th, at noon California time, we’re hosting an AMA with many people from the Android Studio team, who will be answering your questions as fast as they can.
Join us live if you can. But given the short notice, you might be getting this information after it’s already happened. In that case, just check out the AMA site and see what happened!
11 Weeks of Android
We are continuing 11 Weeks of Android with new topics every week. Since last episode, we finished off Android 11 Compatibility, then did a week on Languages, another on Jetpack, and are now in a week dedicated to developer tools. Here’s how to find out more about each of these topics:
Week 4: Android 11 Compatibility
This week focused on what you can do to make sure that your apps are compatible with the Android 11 release (and with new Android releases in general). There were articles, videos, and codelabs to help you get up to speed on the tools that we offer and the things that you need to know, like the compatibility framework that allows you to toggle the behavior changes, and the new resource loading API in Android 11.
Week 5: Languages
This week featured learning content around the languages you use for writing Android apps: Kotlin, C++, and the Java programming language. There were videos and articles on Kotlin language features like coroutines, a video and article on supporting newer Java language features, and information on improvements for C++ developers.
Week 6: Android Jetpack
The Jetpack week had tons of content, because JETPACK HAS SO MUCH STUFF TO OFFER! There were articles, videos, and codelabs on everything from Paging3 to Hilt to CameraX to the new features in the Navigation library.
Week 7: Android Developer Tools
This week is all about the tools you use to write those wonderful apps. There are articles and videos posted already, and more to come throughout the week. Keep an eye on the @AndroidDev #11WeeksOfAndroid feed to find out as content gets posted. Also, check out the video playlist to see what’s landing there, and watch for the wrap-up blog at the end of the week.
Next week: App Distribution & Monetization.
Android 11 Meetups
The online meetups that I talked about last time have continued apace, with events happening all over the world. For example, this Thursday I’ll be speaking at one of these events that will be co-hosted by Google Developer Groups in Boston, New York, Mexico, and Argentina (these online events are really bringing people together…).
Check out the Android 11 Meetups site to find one happening near you.
ADB Podcast Episodes
There have been two more episodes of Android Developers Backstage posted since the last Now in Android. Check them out at the links below, or in your favorite podcast client.
ADB 144: Compilers
Just in time for Languages week of #11WeeksOfAndroid, Tor Norbye and I spoke with Mads Ager from the Android Studio compilers team, about R8/D8 optimizations, the Kotlin compiler front- and back-end, and the new Kotlin symbol processor.
Episode 144: Compilers
In this episode, Chet and Tor talk with Mads Ager from the Android Studio compilers team. We cover a number of…
ADB 145: Grab that Dagger by the Hilt
For Jetpack week, Romain Guy and I chatted with engineers Daniel Santiago and Eric Chang to talk about Hilt, Android’s new recommended way to perform dependency injection.
That’s it for this time. So go test your app with Android 11 Beta 2! See the latest AndroidX releases like WorkManager 2.4, and check out AndroidX on GitHub! Watch the Game Show on YouTube! Learn best practices for developing work profile apps! Read about running immediate jobs using WorkManager! Take the all-new Android Basics in Kotlin course! Join us for the Android Studio Reddit AMA! Check out the articles, videos, codelabs and more for the most recent #11WeeksOfAndroid content. Tune into one of the many Android 11 Meetups happening all over the world! Listen to the latest ADB podcast episodes! And come back here soon for the next update from the Android developer universe.