What’s New in Android 12 Developer Preview 1: Developer Stuff

Android 12

We may earn a commission when you click links to retailers and purchase goods. More info.

Yup, it’s already time for Android 12! If you’re a Pixel device owner, this is a fantastic week, as this is when we can start previewing what’s new inside of the upcoming version of Android. Reported to be internally named Snow Cone, Android 12 appears to focus very heavily on user safety/privacy and an overhaul for the user experience. There’s a lot to go over, so let’s get to it.

Here’s what the Android team has to say about about Android 12 directly:

With each version, we’re working to make the OS smarter, easier to use, and better performing, with privacy and security at the core. In Android 12 we’re also working to give you new tools for building great experiences for users. Starting with things like compatible media transcoding, which helps your app to work with the latest video formats if you don’t already support them, and easier copy/paste of rich content into your apps, like images and videos. We’re also adding privacy protections, refreshing the UI, and optimizing performance to keep your apps responsive.

Today’s first preview is just the start for Android 12, and we’ll have lots more to share as we move through the release.

Without wasting too much time, let’s lay out everything new in Android 12.

What’s New

“Trust and Safety” is at the top of the Android 12 dev preview 1 changelog. Privacy has been a huge part of Android for the past few years, so we’re not surprised by this at all. With that said, Google is providing the following changes for Android 12 developers. Do note, a lot of what you’re about to read won’t make sense unless you’re an actual developer.

  • Modern SameSite cookie behaviors in WebView – In line with changes to Chrome and other browsers, WebView includes new SameSite cookie behaviors to provide additional security and privacy and give users more transparency and control over how cookies can be used across sites.
  • Restricted Netlink MAC – We’re continuing to help developers migrate to privacy-protecting resettable identifiers. In a multi-release effort to ease migration of device-scoped Netlink MAC, in Android 11 we restricted access to it based on API level 30, and in Android 12 we’re applying the restriction for all apps – regardless of targetSDK level.
  • Safer exporting of components – To prevent apps from inadvertently exporting activities, services, and receivers, we’re changing the default handling of the android;exported attribute to be more explicit. With this change, components that declare one or more intent filters must now explicitly declare an android:exported attribute. You should inspect your components in the manifest in order to avoid installation errors related to this change.
  • Safer handling of Intents – To make handling PendingIntents more secure, Android 12 requires apps to explicitly declare a mutability flag, either FLAG_MUTABLE or the new FLAG_IMMUTABLE, for each PendingIntent.

Next up is the “User Experience.” This is where we’re seeing the bulk of changes, but again, most of what Google lists in its release is behind-the-scenes magic for developers. For this section, I’ll be highlighting user-facing changes. For the complete rundown from Google, look here.

  • Compatible media transcoding – With the prevalence of HEVC hardware encoders on mobile devices, camera apps are increasingly capturing in HEVC format, which offers significant improvements in quality and compression over older codecs. Most apps should support HEVC, but for apps that can’t, we’re introducing compatible media transcoding.
  • AVIF image support – To give you higher image quality with more efficient compression, Android 12 introduces platform support for AV1 Image File Format (AVIF). AVIF is a container format for images and sequences of images encoded using AV1. Like other modern image formats, AVIF takes advantage of the intra-frame encoded content from video compression. This dramatically improves image quality for the same file size when compared to older image formats, such as JPEG.
  • Foreground service optimizations – Foreground services are an important way for apps to manage certain types of user-facing tasks, but when overused they can affect performance and even lead to app kills. To ensure a better experience for users, we will be blocking foreground service starts from the background for apps that are targeting the new platform.
  • Rich content insertion – Users love images, videos and other expressive content, but inserting and moving this content in apps is not always easy. To make it simple for your apps to receive rich content, we’re introducing a new unified API that lets you accept content from any source: clipboard, keyboard, or drag and drop.
  • Haptic-coupled audio effect – In Android 12 apps can provide audio-coupled haptic feedback through the phone’s vibrator. The vibration strength and frequency are derived from an audio session, allowing you to create more immersive game and audio experiences.
  • Multi-channel audio – Android 12 includes several enhancements for audio with spatial information. It adds support for MPEG-H playback in passthrough and offload mode, and the audio mixers, resamplers and effects have been optimized for up to 24 channels (the previous maximum was 8).
  • Immersive mode improvements for gesture nav – We’ve simplified immersive mode so that gesture navigation is easier and more consistent, for example when watching a video, reading a book, or playing a game.
  • Notification UI updates – We’re refreshing notification designs to make them more modern, easier to use, and more functional. In this first preview you’ll notice changes from the drawer and controls to the templates themselves. We’re also optimizing transitions and animations across the system to make them more smooth. As part of the updates, for apps targeting Android 12 we’re decorating notifications with custom content with icon and expand affordances to match all other notifications.
  • Faster, more responsive notifications – When users tap a notification, they expect to jump immediately into the app – the faster the better. To meet that expectation, developers should make sure that notification taps trigger Activity starts directly, rather than using “trampolines” – an intermediary broadcast receiver or service – to start the Activity. To keep notifications responsive, Android 12 will block notification trampolines by preventing them from launching their target Activities, and we’re asking developers to migrate away from this pattern.

The last bit Google mentions is about updating apps for Android 12. They are making the process easier for developers by making a lot fo changes opt-in, granting folks more time to get their things updated for compatibility. While polite, we do hope developers don’t take too long to ensure their apps work and look gorgeous running on Android 12.

That’s it for Developer Preview 1! We’ll update you each time we have a new preview and we’ll list all of the new goodies.

Download Android 12 Here

// Android Developers

Category

Tags

Collapse Show Comments
8  Comments