What’s new in Android at Google I/O 21 ?

Oumaima Makhlouk
Nerd For Tech
Published in
5 min readMay 31, 2021

As an Android developer, the more people depend on your apps, the more the expectation are higher and the job as an android developer doesn’t get easier. I’m going to talk about the Android new features that has been introduced during Google I/O, so let’s go.

Design changes and new features

Color: By default, if you want as an application developer to harmonize with the default theme accent color, you can just use Theme.DeviceDefault.DayNight which allows you to adapt to a light theme and dark theme.

Google Image

In Android 12, they expanded the palette of color considerably and all the system services use it.

As you can see, the lock screen, home screen, notifications and settings are all using the same palette and are harmonized together. The palette is selected automatically based on the wallpaper.

Widgets: To make widgets more delightful experience, there is a new whole API that you can use to build these widgets in a new way.

Launch animations: One of the jankiest things about the Android experience can be the cold start. In Android 12, they are going to add a new splash screen, an animation that looks great for every app as a baseline. Every app will get a nice new zoom in animation that highlights your app’s icon.

If this animation doesn’t meet your needs, you can substitute yours, or you can customize the system icon.

Android 12 will get rid of the annoying notification Feature

As a user, when you tap on a notification and the nothing seems to happen for a few seconds, that’s because the app has used instead of launching an activity directly from that notification, they’ve sent a broadcast or kicked off a service so that they can do other work in the background. It’s called trampoline and it introduces this huge gape where it seems like the phone is just non-responsive. So Google decided to prohibit applications from using such a delay and requires developers to change the notification system of their applications to the new rules.

Toasts: Adding the icon of the app that was sending the toast so the user will know where the toast message coming from, also reducing the amount of text that can be put on the toast.

Picture in Picture (PiP): Until now, when the user was going back to home screen using the swipe up to home gesture, the system had to wait for that transition to finish before it could animate the transition to PiP from your app which means it was very difficult for your application to control this experience. Now in Android 12, they have introduced new features for the PiP mode:

Blur effect: Good news 🎉🎉 A new API on view called setRenderEffect and you can use it on any views.

imageView.setRenderEffect(
RenderEffect.createBlurEffect(
radiusX, radiusY, SHADER_TILE_MODE))

You can also blur what’s outside of your window content.

Sparkle effect: ✨ it’s part of the new visual language of Android 12.

AVIF image support: To give you higher image quality with more efficient compression, Android 12 introduces platform support for AV1 Image File Format (AVIF), this image format is better than JPEG and PNG on some axes. As you can see, the AVIG image is less blocky and less bending in the sky.

AVIF vs JPEG

Audio-coupled haptic playback: It’s a very fancy name for something that’s pretty simple and quite delightful. You can take an audio track from a media player and you can send it to the haptic generator and it’s going to generate vibrations patterns or haptic patterns based on that audio track. So let’s say if you have a game, and you have an audio track with the footsteps of the main character or the sound of the rain, you can feed that to the haptic generator to automatically create these really nice vibrations patterns for your user to increase immersion.

if( HapticGenerator.isAvailable()){
val audioSession = audioTrack.audioSessionId
generator = HapticGenerator.create(audioSession)
}

Privacy dashboard and improved permissions:

For more transparency and clarity around access to data, Android 12 have now a privacy dashboard accessible from settings to making it clearer on what’s going on in the system and to give more control to the user.

Approximate location: When using an app that targets Android 12, users can request that the app have access to only approximate location information.

Drag&Drop: In Android 12, they collapsed drag & drop, copy & paste and keyboards stickers into a single API encode path, the setOnReceiveContentListener and it does the right for all the three of these use cases.

--

--