Android Developers Blog
The latest Android and Google Play news for app and game developers.
🔍
Platform Android Studio Google Play Jetpack Kotlin Docs News

14 July 2021

Android 12 Beta 3 and final APIs


Link copied to clipboard

Posted by Dave Burke, VP of Engineering

Android 12 logo

Each month we’re bringing Android 12 closer to its final form, with innovative features, a new UI that adapts to you, performance improvements, privacy enhancements, security benefits, and much more. Many of you are already developing and testing on Android 12 through our Beta program - thank you for all of the feedback you’ve shared so far!

There’s still a lot to do to land this release, though, and today we’re pushing out the third Beta of Android 12 for you to try. Along with updates like scrolling screenshots, privacy indicator APIs, and enhanced auto-rotate, Beta 3 also includes the final Android 12 APIs and the official SDK. WIth these, you can start testing and updating your app ahead of Platform Stability, coming up next at Beta 4. Now is the time to make sure your apps are ready!

You can get Beta 3 today on your Pixel device by enrolling here for over-the-air updates, and if you previously enrolled, you’ll automatically get today’s update. You can also get Android 12 Beta 3 on select devices from several of our device-maker partners like Sharp and TCL - learn more at android.com/beta. Visit the Android 12 developer site for details on how to get started.

What’s new in Beta 3?

Beta 3 includes a number of updates to improve functionality, user experience, and performance. Here are a few highlights.

Scrolling screenshots - To make it easier to capture and share scrolling content, we’re adding scrolling screenshots. Starting in Beta 3, when users capture a screenshot of content that’s scrollable, they’ll now see a “Capture more” button to extend the screenshot to the full content and they can then adjust the crop.

capturing a scrolling screenshot in the Settings app

Capturing a scrolling screenshot in the Settings app

Scrolling screenshots work out-of-the-box for most apps -- if your app uses a standard View-based UI, no changes should be needed. For apps and UI toolkits that are not using View-based UI or that use highly customized UI, we’re introducing a new ScrollCapture API to support scrolling screenshots. With this API, the system notifies your app of scroll capture requests and provides a Surface for you to draw your UI into. We’re continuing to iterate on scrolling screenshots and in Beta 4 you’ll see improvements to the default support, such as for scrolling ListViews. We're also working to provide support for a wider variety of content (such as web content). Let us know what you think!

On-device search - With Beta 3 we’re highlighting platform support for AppSearch, a new high-performance on-device search engine. With AppSearch, apps can index structured data and search over it with built-in full-text search capabilities, and they can use native features like highly-efficient indexing and retrieval, multi-language support, and relevancy ranking.

AppSearch comes in two flavors: a local index for your app to use that’s backward-compatible through a new AppSearch Jetpack library, and a central index that’s maintained for the entire system in Android 12 (and later releases). When you participate in the central index, the system will be able to display your app’s data on System UI surfaces unless you choose to opt out. Additionally, you can securely share data with other apps, allowing them to search your app’s data as well as their own. More here.

Privacy indicator APIs in WindowInsets - In Beta 2 we added support for privacy indicators in the status bar that show when an app is using the device camera or microphone. Since the indicators can be displayed when an app is in immersive mode and could potentially cover controls or content, apps need to know where the indicators can be drawn and make any adjustments needed to prevent useful content from being covered. In Beta 3 we’ve added new privacy indicator APIs to WindowInsets that let you get the maximum bounds of the indicators and their relative placement on the screen, taking into account the current orientation and language settings. More here.

Camera and microphone toggles configurable for enterprises - In Beta 2 we also introduced new toggles that let users instantly turn off access to the device microphone and camera for all apps. We’ve now made these accessible to enterprise administrators who can set any restrictions needed on fully managed devices. More here.

New permission for CDM-paired apps starting foreground services - To better support companion apps carrying out core functionality while providing transparency to the system, apps paired with Companion Device Manager (CDM) can launch foreground services from the background by declaring a new normal permission. More here.

Better, faster auto-rotate - We’ve enhanced Android’s auto-rotate feature with face detection, using the front-facing camera to more accurately recognize when to rotate the screen. This is especially helpful for people who are using their devices while lying down on a couch or in bed, for example. For developers, this means that the auto-rotation behavior will provide a better user experience for users who have opted in through Settings. The enhanced auto-rotate feature lives within our recently announced Private Compute Core, so images are never stored or sent off the device. In Beta 3 this feature is available on Pixel 4 and later Pixel devices.

To make screen rotation as speedy as possible on all devices, we’ve also optimized the animation and redrawing and added an ML-driven gesture-detection algorithm. As a result, the latency for the base auto-rotate feature has been reduced by 25%, and the benefits of the face detection enhancement build on top of those improvements. Give the auto-rotate improvements a try and let us know what you think.

Android 12 for Games - With Game Mode APIs, you can react to the players' performance profile selection for your game - like better battery life for a long commute, or performance mode to get peak frame rates. These APIs will be tied to the upcoming game dashboard which provides an overlay experience with quick access to key utilities during gameplay. The game dashboard will be available on select devices later this year.

play as you download image

Play as you download on Android 12 with Touchgrind BMX

Meanwhile, play as you download will allow game assets to be fetched in the background during install, getting your players into gameplay faster.

Visit the Android 12 developer site to learn more about all of the new features in Android 12.

Final APIs and SDK

Over the past several weeks we've been working to finalize the Android 12 APIs and today we're releasing them with Beta 3, along with the official API Level 31 SDK. We plan to reach full Platform Stability at Beta 4, when all app-facing system behaviors and non-SDK interface restrictions will also be final, in addition to the API surfaces.

If you’re compiling your app against the Android 12 APIs, we recommend using today’s release to update your environment and recompile your apps with the final SDK and latest tools.

App compatibility

With many early-adopter users and developers getting Android 12 Beta on Pixel and other devices, now is the time to make sure your apps are compatible and ready for them to use!

To test your app for compatibility with Beta 3, just install the published version from Google Play or other source onto a device or emulator running Android 12 Beta. Work through all of the app’s flows and watch for functional or UI issues. Review the behavior changes to focus your testing on areas where underlying changes may affect your app. There’s no need to change your app’s targetSdkVersion at this time, so once you’ve resolved any issues, we recommend publishing an update as soon as possible for your Android 12 Beta users.

platform stability

As mentioned earlier, Android 12 will reach Platform Stability in the next release, Beta 4. With Platform Stability, all app-facing system behaviors, SDK/NDK APIs, and non-SDK restrictions will be finalized. At that time, you can begin your final compatibility testing and release a fully compatible version of your app, SDK, or library. More on the Android 12 timeline for developers is here.

Get started with Android 12!

Today’s Beta release has everything you need to try the latest Android 12 features, test your apps, and give us feedback. Just enroll any supported Pixel device to get the update over-the-air. To get started developing, set up the Android 12 SDK.

You can also get Android 12 Beta 3 on devices from some of our top device-maker partners like Sharp and TCL. Visit android.com/beta to see the full list of partners participating in Android 12 Beta. For even broader testing, you can try Android 12 Beta on Android GSI images, and if you don’t have a device you can test on the Android Emulator.

Beta 3 is also available for Android TV, so you can check out the latest TV features and test your apps on the all-new Google TV experience. Try it out with the ADT-3 developer kit. More here.

For complete details on Android 12 Beta, visit the Android 12 developer site.