Image for post
Image for post
Illustration by Virginia Poltrack

Now in Android #27

Android Studio 4.1, MAD Skills series, more Kotlin vocabulary, Play Billing subscriptions, biometric authentication, MotionLayout tags and a podcast resource on resources

Chet Haase
Oct 14 · 6 min read

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

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

Android Studio 4.1: Now Stable!

Image for post
Image for post

Android Studio 4.1 recently released its stable build. I’ve talked about this release in earlier episodes as it worked its way through pre-stable releases, but here again are just a few highlights:

  • Database inspector: You can both view the state of and make changes to your on-device database (using Jetpack Room or raw SQLite queries) in the IDE.
  • New project templates have been updated to use Material Design Components.
  • Integrated emulator window: You can now run the emulator directly in the IDE instead of in its own, separate window. You can’t spell Integrated Development Environment without, well, “Integrated”.
  • Dagger/Hilt code navigation: Click on the new gutter actions to find out more about Dagger and Hilt types in your code.
  • ML Model Binding: Studio can generate code for an imported TensorFlow Lite model which makes it easier to interact with that model from your app code.

You can learn more about this release in Yacine Rezgui’s video as well as in Scott Swarthout’s blog and the Android Studio release notes. Or heck, just download the thing and see for yourself.

MAD Skills: The Series

Image for post
Image for post

We’ve launched a new series about Modern Android Development called MAD Skills. The series will have content in video and article form about various pieces of MAD, including the language (Kotlin), tools (Android Studio), APIs (a subset of Jetpack), and distribution (Android App Bundles). Every few weeks we’ll start a new miniseries on a specific topic.

This week we started things rolling with a series about the Navigation component. In the first episode, I give an overview of the API and tool. The second episode shows how to navigate to dialog destinations. And next week we’ll post episodes covering SafeArgs and deep links.

Check out the MAD Skills playlist for the shows we’ve posted so far, and check back as we continue to post new episodes every week until… well, we haven’t planned an end yet. But we have a lot of technical content to cover, so it’ll be a while.

For those that prefer your content in article form, whenever a video is published which covers material not yet described in an article, we will post an accompanying article in the Android Developers publication on Medium, so keep an eye out there for future MAD articles.

Remember: Don’t get even — get MAD!

Kotlin Vocabulary

There were a couple of new episodes in the ongoing Kotlin Vocabulary series.

Default Arguments

Florina Muntenescu posted an article and video teaching how Kotlin’s default arguments work. Default arguments are a powerful language feature of Kotlin that allow both reduction in the number of overloaded functions (imaginean alternate reality where View.java could get by with only one constructor instead of four!) as well as simpler calling code when common cases can rely on reasonable defaults.

By the By: Kotlin Delegates

Murat Yener also posted an article and video about the delegate feature of Kotlin. Delegates can be used to hand off work to some other code. The article shows examples of class delegates (where a class can defer to some other class completely) and property delegates (where code can defer to another object to provide the underlying get/set functions for a property).

Kotlin provides not only the infrastructure and language keyword (by which I mean by), but also several built-in delegates (such as by lazy), though this article stops at the “How does it work?” stage and, er, delegates explanations of built-in delegates to a future article.

Play Billing Subscriptions

Caren Chang posted an article to help you figure out how to support new Play Billing features and requirements related to subscriber acquisition and retention. These changes take effect on November 1, so if your app sells subscription products, you might want to learn what to do soon.

Biometric Authentication

Isai Damier has posted a two-part series of articles: Biometric Authentication on Android.

Part 1 discusses why you should consider incorporating biometric authentication. For example, if your app requires users to log in frequently, offering biometric authentication makes that required experience easier and faster for them. Or if your app only requires login once, after install (probably because logging in with a password is tedious), then biometric authentication might offer a way for you to provide more security for users while using a more convenient login mechanism than traditional password login.

This article also introduces using the BiometricPrompt API (in the AndroidX Biometric library) to handle authentication.

Part 2 walks through some of the details of using the API as well as the recommended design flow for authenticating users.

Motion Tags: KeyPosition

The Motion Tags show posted another episode discussing KeyPosition. The KeyPosition tag specifies layout information during a MotionLayout animation. You can see the rest of the episodes in the series so far by checking out the Motion Tags playlist.

Podcast Episodes

Image for post
Image for post

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 150: Aaptly Named

This time, Tor Norbye, Romain Guy, and I talked with Ryan Mitchell from the framework team about resources, including how the aapt2 tool does its job.

Now then…

That’s it for this time. Go download the latest Android Studio stable release! Check out the MAD Skills series! Learn about Kotlin language features like default arguments and delegates! Learn how to support new Google Play features and requirements for customer subscriptions! Read how and why to use biometric authentication in your app! Watch the latest Motion Tags video to find out about KeyPosition! Listen to the latest ADB podcast episode! And come back here soon for the next update from the Android developer universe.

Android Developers

The official Android Developers publication on Medium

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