Google I/O: What’s New in Android

The third session of Google I/O ’19, What’s New in Android, was really exciting! Google presented a long list of new Android features. There were also many exciting reveals and plans for the Android framework. With Android Q in beta 3, Chet Haase, Dan Sandler, and Romain Guy, had plenty to show the crowd. While […] By Victoria Gonda.

Leave a rating/review
Save for later
Share
You are currently viewing page 2 of 2 of this article. Click here to view the first page.

Kotlin First

Developing for Android is increasingly Kotlin first. This is another example of the team listening to the community. For example, new APIs in Q all have nullability annotations. Nullability is enforced as errors instead of warnings with Android Q.

On top of this, the team added support for coroutines in Jetpack libraries and Kotlin first libraries. You can now use WorkManager, LiveData, Room and other parts of the Jetpack libraries with support for coroutines. This brings easier cancellation and threading to those libraries.

Jetpack

As mentioned, Google added some upgrades and new additions to Jetpack, the collection of libraries meant to replace the support libraries previously favored.

Architecture Components

There are new versions of both WorkManager and Navigation. You’ll also see improvements to support coroutines to Lifecycles, LiveData and Room.

Google has added SavedState for ViewModel to help with saving state when the system destroys your app. Google has also added Benchmarking for benchmarking your code.

CameraX

There’s a new easier-to-use API for the camera called CameraX. It’s more concise for common features and has more consistent behavior across Android devices. It’s also backwards-compatible back to Android L.

Additionally, Google is working with manufacturers to include device specific API extensions.

Jetpack Compose

This is one of the shiny, new things you get this year! Jetpack Compose is a library which simplifies UI development. It’s a reactive, Kotlin tool used for creating and managing the UI. Like Flutter, with Jetpack Compose you can build the UI fully declaratively, without XML!

ViewPager2

The much needed ViewPager2, now in alpha stages, is like ViewPager, but better. It’s based on RecyclerView and has an easy migration from ViewPager. It includes features such as right-to-left, or RTL, support, vertical paging and improved dataset notifications. You can check it out already!

ViewBindings

ViewBindings will help you manage your view references. These bindings generated from XML layout files have null-safe and type-safe fields without the need for an annotation processor. They also support a Kotlin synthetic-like syntax so they’re very easy to use.

Graphics and Media

Because of limited time, the presenters sped through this part of the presentation. However, you have the opportunity to spend some time here! There are plenty of tools to make your graphics more efficient.

Blend Modes

The new android.graphics.BlendMode API replaces the confusing PorterDuff.Mode. PorterDuff still works, but you might want to look into BlendMode. New available modes include HARD_LIGHT, SOFT_LIGHT and more.

RenderNode

The Android’s UI toolkit team uses RenderNode internally in their views for hardware acceleration. Now, Google’s exposing it for your use, as well.

It provides efficient rendering which allows you to set position, alpha, offset and more. You can even use it to create shadows without using views!

HardwareRenderer

The UI toolkit team also uses HardwareRenderer internally. It renders a scene of RenderNodes to a Surface and lets you control the light source for Material shadows. You can check it out now!

Animated shadow

Hardware Bitmaps

In another cool update, Bitmap can now wrap a HardwareBuffer. This means you can have frequent bitmap updates without texture uploads. You can use a Surface as a Bitmap in your UI.

Vulkan and ANGLE

All new 64 bit devices now require Vulkan 1.1. It comes with the experimental ANGLE, which is OpenGL ES running on top of Vulkan. This will allow them to more easily deliver updates to the OpenGL ES driver using an APK. If you’re wondering how it works, head over to the official docs!

Wide Color Gamut

Finally, there are changes to the Wide Color Gamut introduced in Android O. To improve performance and battery life, Google changed it from sixteen-bit color depth to eight-bit color depth. The company also expanded the related APIs.

Where to Go From Here?

We’re so excited about all the features that are coming to both Android and Google products! Keep an eye out for tutorials and articles on these topics. While you wait, you can watch the full Google I/O ’19 What’s New in Android recording.

What are you excited about from Google I/O ’19? Join us in the forum with any comments or questions.

Contributors

Filip Babić

Final Pass Editor

Over 300 content creators. Join our team.