By Dave Burke, VP of Engineering

Today at Google I/O, we announced the first Beta of Android 12. Android 12 is one of our most ambitious releases ever, and we’re committed to creating a new user interface that suits your needs, improves performance, and puts privacy and security at the heart of it. For developers, we give you more tools to build enjoyable experiences on phones, laptops, tablets, wearables, TVS, and cars.

There’s a lot to explore in Beta 1. The first is the most important UI update for Android, which is created in a design language we call Material You. We also have some new privacy features for you to try out, such as approximate location, and a new standard called Performance Class that allows apps and users to identify high-performance devices.

You can start experimenting with Android 12 Beta today on Pixel devices. In addition, thanks to the efforts of our device manufacturer partners, you can now also try out the Beta on more devices, including select devices from Asus, OnePlus, OPPO, Realme, Sharp, TCL, Transsion, Vivo, Xiaomi and ZTE, More devices are joining the fray. Click here for more details.

Read on for more highlights of the release. For more information on Android 12 and how to get started, visit the Android 12 Developer website.

The new UI of Android

As we highlighted in our consumer-facing blog post, Android 12 brings one of the biggest design changes in Android history. We’ve rethought the entire experience, including colors, shapes, lighting and motion, to make Android 12 more expressive, alive and personal. This work was done in deep collaboration with our software, hardware, and Material Design teams. We’re unifying the ecosystem of software and hardware under a single design language called Material You.

We have extended the new design language to cover the entire platform and UI components, so your applications will automatically receive these upgrades.

Redesigned Widgets – With the design updates in Android 12, app widgets have been redesigned to be more useful, aesthetically pleasing, and easier to find. We added new interactive controls, such as check boxes, switches, and radio buttons, and made it easier to configure widgets. Android 12 Widgets work beautifully with our system UI and themes, with rounded corners and padding automatically adapted to each launcher and home screen. Responsive layout lets you adapt widgets to phones, tablets, foldable devices, and other screens. We also added a dynamic color API so that your widgets can use system colors to create a personalized and consistent look. We’ve also made widgets easier to find with improved widget pickers and integration with Assistant. You can see the sample code here and get a taste of it. Please visit the official documentation for details.

Over-scrolling and Stretching – We also added a new system-level over-scrolling “stretching” effect to let users know they have scrolled to the end of the content in the user interface. Stretch provides natural vertical and horizontal scroll stop indications that are universal across all applications and are enabled by default across the platform and in AndroidX’s scroll container. The new over-scrolling stretch effect replaces the glow effect in the previous version. Be sure to test the new scrolling behavior in your applications and content, or you can choose not to enable it. Please visit the official documentation for details.

Smoother audio transitions – THE UI doesn’t just cover visuals, we’ve also improved the way we handle audio focus. When an app loses audio focus, its audio automatically fades out, providing a smoother transition between apps that play audio and preventing their sounds from overlapping. This is especially important in a foldable and multi-screen Android environment. Please visit the official documentation for details.

performance

With Android 12, we’ve made significant and deep resource investments in performance, from improving basic performance to make the system and apps faster and smoother, to setting new standards for high-performance devices to help developers deliver richer experiences on those devices.

Faster, more efficient system performance – We have reduced the CPU time required for core system services by 22%, so devices will be faster and more responsive. We also improved Android’s power efficiency by reducing the use of large cores on the system’s servers by 15%, allowing devices to run longer before they need to be recharged.

We improved application switching and startup times by reducing the degree of variation in lock contention and latency. We also optimized I/O to speed up application loading. In PackageManager, read-only snapshots reduce lock contention by 92%. With Binder, lightweight caching radically improves the latency of target calls by up to 47 times. On the I/O side, we accelerated the dex/odex/vdex files to improve app load times, especially on low-memory phones. Our restrictions on notification trampoline also help reduce latency for applications launched from notifications. For example, the Google Photos app started 34% faster after skipping without notifications.

To improve database query performance, we optimized CursorWindow by inlining results in Binder transactions. CursorWindow is 36% faster for small Windows and up to 49 times faster for Windows over 1,000 lines.

Performance Levels – Starting with Android 12, together with our ecosystem partners, we introduced a common standard for high-performance Android devices.

This standard is called the Performance Class, and it defines a set of capabilities that go beyond the basic requirements of Android. Devices that meet performance rating requirements can support more demanding use cases and provide higher quality content. Developers can check performance levels at run time and then reliably provide an enhanced experience to take full advantage of the device’s performance.

We are currently focusing on media use cases with performance level metrics covering camera startup latency, available codecs and coding quality, minimum memory size, screen resolution, and read/write performance. Please visit the official documentation for details.

Protect privacy from the design source

Privacy is at the heart of everything we do, and with Android 12, we’ll continue to give you more transparency and control while keeping your devices and data secure. Today we also announced some Privacy features coming in Beta 2, including a Privacy Dashboard, background information to enable apps to share more data usage, indicators for the microphone and camera, switches for the microphone and camera, and clipboard notifications. Stay tuned for further updates to these features. Here are some new additions to Beta 1.

App Sleep – Last year we released automatic permission reset, and in the past two weeks Android has reset more than 8.5 million unused app permissions. Forgotten apps will no longer have access to users’ data. In Android 12, we are implementing intelligent sleep on apps that have not been used for a long time, on top of automatic permission reset, to optimize device storage, performance, and security. Hibernation not only revokes previously granted permissions by the user, but also forces the application to stop and reclaims memory, storage, and other temporary resources. The system also prevents hibernating apps from running jobs in the background or receiving push notifications to help users stay safe. Hibernation should be transparent to most applications, but you can turn off hibernation for your application by directing the user to Settings if necessary. Please visit the official documentation for details.

Nearby Device Permissions – Previously, Bluetooth scanning required apps to have location permissions, which was a challenge for apps that needed to pair with nearby devices but didn’t actually need device location. Apps can now scan nearby devices without requiring location permission. Applications that have upgraded their Target SDK level to Android 12 can be scanned using the new BLUETOOTH_SCAN permission and set usesPermissionFlags=”neverForLocation” property. Once paired with the device, you can interact with it using the BLUETOOTH_CONNECT permission. These permissions are designed to promote privacy-friendly app design while lowering the barriers to app use. Please visit the official documentation for details.

Approximate Location – In recent updates, we have provided better ways to manage access to locations, such as separate permissions for foreground and background access, and a “once only” option. Now, for Android 12 apps, we bring more control with a new “approximate location” option. When an application requests precise location data, users can now choose to grant exact or approximate locations. The user can change the location accuracy of the application at any time by “setting”. If your application requests exact location data (ACCESS_FINE_LOCATION), consider the changes this time to ensure that your application can function with only approximate locations. For almost all common location use cases, we recommend only asking for an approximate location (ACCESS_COARSE_LOCATION). Please visit the official documentation for details.

Application compatibility

If you haven’t already tested your app’s compatibility with Android 12, now is the time! With Android 12 in Beta, we’ve opened it up to early adopters and developers on Pixel and other devices. This means that in the coming weeks you’ll see more users experimenting with your app on Android 12 and submitting problems they find.

To test compatibility, install your official app on a device or emulator running Android 12 Beta, through Google Play or other sources, and test all of the app’s processes. Use the behavior change list to determine test focus. Release an updated version as soon as you resolve any problems you find.

With the release of Beta, we are getting closer to the August 2021 platform stability milestone. At that point, the application-oriented system behavior, SDK/NDK API, and non-SDK list will all be finalized. You will be able to complete final compatibility tests and publish a fully compatible application, SDK, or development library. See the release schedule for details.

Start playing Android 12 now

Whether you want to try out Android 12’s features, test your apps, or submit feedback, you can start with this Beta. Simply sign up for the test using a supported Pixel device to get updates over the air (OTA). If you have installed the previous preview, you will automatically get the Beta update. To get started, set up your SDK.

You can also try out the Android 12 Beta on devices from top device manufacturer partners participating in the Android 12 Developer Preview program. Please visit the developer. The android. Google. Cn/about/versi… See the full list of partners, as well as links to their websites for detailed information on the devices they support. Each partner will provide registration and support capabilities and will provide Beta updates directly to you.

For more extensive testing on more devices, install and play Android 12 Beta with an Android GSI image. If you don’t have a device, you can also test it on an Android emulator. Just download the latest emulator system image from Android Studio’s SDK manager.

Please visit the Android 12 developer website for details on getting a Beta.

Your feedback and questions about our products are very important to us. Please click here to submit your feedback to us. Your questions may appear and be answered in the next FAQ. Thank you for your support!