Tag Archives: #Android12

Beta 1 Update for 12L feature drop!

Posted by Maru Ahues Bouza, Director, Android Developer Relations

Image showing different kinda of large screens

At Android Dev Summit in October we highlighted the growth we’re seeing in large screen devices like tablets, foldables, and Chromebooks. We talked about how we’re making it easier to build great app experiences for these devices through new Jetpack APIs, tools, and guidance. We also introduced a developer preview of 12L, a feature drop for Android 12 that’s purpose-built for large screens.

With 12L, we’ve optimized and polished the system UI for large screens, made multitasking more powerful and intuitive, and improved compatibility support so apps look better right out of the box. 12L also includes a handful of new APIs for developers, such as for spatial audio and improved drag-and-drop for accessibility.

Today we’re releasing the first Beta of 12L for your testing and feedback as you get your apps ready for the feature drop coming early next year. You can try the new large screens features by setting up an Android emulator in Android Studio. 12L is for phones, too, and you can now enroll here to get 12L Beta 1 on supported Pixel devices. If you are still enrolled in the Android 12 Beta program, you’ll get the 12L update automatically. Through a partnership with Lenovo, you can also try 12L on the Lenovo Tab P12 Pro tablet, see the Lenovo site for details on available builds and support.

What’s in 12L Beta 1?

Today’s Beta 1 build includes improvements to functionality and user experience as well as the latest bug fixes, optimizations, and the December 2021 security patches. For developers, we’ve finalized the APIs early, so Beta 1 also includes the official 12L APIs (API level 32), updated build tools, and system images for testing. These give you everything you need to test your apps with the 12L features.

With 12L, we’ve focused on refining the UI on large screen devices, across notifications, quick settings, lockscreen, overview, home screen, and more. For example, on screens above 600dp, the notification shade, lockscreen, and other system surfaces use a new two-column layout to take advantage of the screen area.


Image showing a two-column layout

Two-column layouts show more and are easier to use


Multitasking is also more powerful and intuitive - 12L includes a new taskbar on large screens that lets users instantly switch to favorite apps on the fly or drag-and-drop apps into split-screen mode. Remember, on Android 12 and later, users can launch any app into split screen mode, regardless whether the app is resizable. Make sure to test your apps in split screen mode!


GIF showing the drag and drop in split screen mode

Drag and drop apps into split-screen mode


Last, we’ve improved compatibility mode with visual and stability improvements to offer a better letterboxing experience for users and help apps look better by default. If your app is not yet optimized for large screens, make sure to test your app with the new letterboxing.

More APIs and tools to help you build for large screens

As you optimize your apps for large screens, here are some of our latest APIs and tools that can make it easier to build a great experience for users.

  • Material patterns for large screens - Our new Material Design guidance can help you plan how to scale your app’s UI across all screens.
  • Jetpack Compose for adaptive UI - Jetpack Compose makes it very easy to handle UI changes across different screen sizes or components. Check out the Build adaptive layouts in Compose guide for the basics of what you need to know.
  • Window Size Classes for managing your UI - Window Size Classes are opinionated viewport breakpoints to help you more easily design, develop and test resizable application layouts. Watch for these coming soon in Jetpack WindowManager 1.1.
  • Activity embedding - With Activity embedding APIs you can take advantage of the extra display area on large screens by showing multiple activities at once, such as for the List-Detail pattern, and it requires little or no refactoring of your app. Available in Jetpack WindowManager 1.0 Beta 03 and later.
  • Visual linting in Android Studio - In Android Studio Chipmunk, try the new visual linting tool that proactively surfaces UI warnings and suggestions in Layout Validation, to help identify potential issues on large screens.
  • Resizable emulator - This new emulator configuration comes with Android Studio Chipmunk and lets you quickly toggle between the four reference devices - phone, foldable, tablet, and desktop for easier testing.

Make sure to check out all of our large screens developer resources for details on these and other APIs and tools.

Get started with 12L on a device!

With the 12L feature drop coming to devices early next year, now is a great time to optimize your apps for large screens. For developers, we highly recommend checking out how your apps work in split screen mode with windows of various sizes. If you haven’t optimized your app yet, see how it looks in different orientations and try the new compatibility mode changes if they apply.

The easiest way to get started with the large screen features is using the Android Emulator in a foldable or tablet configuration - see the complete setup instructions here.

Now you can also flash 12L onto a large screen device. Through a partnership with Lenovo, you can try 12L preview builds on the Lenovo Tab P12 Pro. Currently Lenovo is offering a Developer Preview 1 build, with updates coming in the weeks ahead. Visit Lenovo's 12L preview site for complete information on available builds and support.

12L is coming to phones, too, and although you won’t see the large screen features on smaller screens, we welcome you to try out the latest improvements in this feature drop. Just enroll your supported Pixel device here to get the latest 12L Beta update over-the-air. If you are still enrolled in the Android 12 Beta program, you’ll automatically receive the update 12L.

For details on 12L and the release timeline, visit the 12L developer site. You can report issues and requests here, and as always, we appreciate your feedback!

12L and new Android APIs and tools for large screens

Posted by Dave Burke, VP of Engineering

image shows four devices illustrating 12L and new Android APIs and tools for large screens

There are over a quarter billion large screen devices running Android across tablets, foldables, and ChromeOS devices. In just the last 12 months we’ve seen nearly 100 million new Android tablet activations–a 20% year-over-year growth, while ChromeOS, now the fastest growing desktop platform, grew by 92%. We’ve also seen Foldable devices on the rise, with year on year growth of over 265%! All told, there are over 250 million active large screen devices running Android. With all of the momentum, we’re continuing to invest in making Android an even better OS on these devices, for users and developers.

So today at Android Dev Summit, we announced a feature drop for Android 12 that is purpose-built for large screens, we’re calling it 12L, along with new APIs, tools, and guidance to make it easier to build for large screens. We also talked about changes we’re making to Google Play to help users discover your large-screen optimized apps more easily. Read on to see what’s new for large screens on Android!

Previewing 12L: A feature drop for large screens

Today we're bringing you a developer preview of 12L, our upcoming feature drop that makes Android 12 even better on large screens. With the preview, you can try the new large screen features, optimize your apps, and let us know your feedback.

In 12L we’ve refined the UI on large screens across notifications, quick settings, lockscreen, overview, home screen, and more. For example, on screens above 600dp, the notification shade, lockscreen, and other system surfaces use a new two-column layout to take advantage of the screen area. System apps are also optimized.

image shows a phone with two-column layouts

Two-column layouts show more and are easier to use

We’ve also made multitasking more powerful and intuitive - 12L includes a new taskbar on large screens that lets users instantly switch to favorite apps on the fly. The taskbar also makes split-screen mode more discoverable than ever - just drag-and-drop from the taskbar to run an app in split-screen mode. To make split-screen mode a better experience in Android 12 and later, we’re helping users by automatically enabling all apps to enter split screen mode, regardless whether the apps are resizable.

GIF image shows maps and web brower on the screen at the same time

Drag and drop apps into split-screen mode

Last, we’ve improved compatibility mode with visual and stability improvements to offer a better letterboxing experience for users and help apps look better by default. We’ve made letterboxing easily customizable by device manufacturers, who can now set custom letterbox colors or treatments, adjust the position of the inset window, apply custom rounded corners, and more.

We plan to release the 12L feature drop early next year, in time for the next wave of Android 12 tablets and foldables. We’re already working with our OEM partners to bring these features to their large screen devices - watch for the developer preview of 12L coming soon to the Lenovo P12 Pro. With the features coming to devices in the few months ahead, now is a great time to optimize your apps for large screens.

For developers, we highly recommend checking out how your apps work in split screen mode with windows of various sizes. If you haven’t optimized your app yet, see how it looks in different orientations and try the new compatibility mode changes if they apply. Along with the large screen features, 12L also includes a handful of new APIs for developers, along with a new API level. We’ve been careful not to introduce any breaking changes for your apps, so we won’t require apps to target 12L to meet Google Play requirements.

To get started with 12L, download the 12L Android Emulator system images and tools from the latest preview release of Android Studio. Review the features and changes to learn about areas to test in your apps, and see preview overview for the timeline and release details. You can report issues and requests here, and as always, we appreciate your feedback!

12L is for phones, too, but since most of the new features won’t be visible on smaller screens, for now we’re keeping the focus on tablets, foldables, and ChromeOS devices. Later in the preview we plan to open up Android Beta enrollments for Pixel devices. For details, visit developer.android.com/12L.

Making it easier to build for large screens

It's time to start designing fully adaptive apps to fit any screen, and now we're making it even easier. To help you get ready for these changes in the OS and Play, along with the developer preview we're releasing updates to our APIs, tools and guidance.

Design with large screen patterns in mind

The first step to supporting adaptive UI is designing your app to behave nicely on both a small and a larger screen. We’ve been working on new Material Design guidance that will help you scale your app’s UI across all screens. The guidance covers common layout patterns prevalent in the ecosystem that will help inspire and kick-start your efforts.

Image shows four Adaptive UI patterns in the Material Design guidelines

Adaptive UI patterns in the Material Design guidelines

Build responsive UIs with new navigation components

To provide the best possible navigation experience to your users, you should provide a navigation UI that is tailored to the Window Size Class of the user’s device. The recommended navigation patterns include using a navigation bar for compact screens and a navigation rail for medium-width device classes and larger (600dp+). For expanded-width devices, there are several ideas on larger screen layouts within our newly released Material Design guidance such as a List/Detail structure that can be implemented, using SlidingPaneLayout. Check out our guidance on how to implement navigation for adaptive UIs in Views and Compose.

While updating the navigation pattern and using a SlidingPaneLayout is a great way to apply a large screen optimized layout to an existing application with fragments, we know many of you have applications based on multiple activities. For those apps, the new activity embedding APIs released in Jetpack WindowManager 1.0 beta 03 make it easy to support new UI paradigms, such as a TwoPane view. We’re working on updating SlidingPaneLayout to support those APIs - look for an update in the coming months.

Use Compose to make it easier to respond to screen changes

Jetpack Compose makes it easier to build for large screens and diverse layouts. If you’re starting to adopt Compose, it’s a great time to optimize for large screens along the way.

Compose is a declarative UI toolkit; all UI is described in code, and it is easy to make decisions at runtime of how it should adapt to the available size. This makes Compose especially great for developing adaptive UI, as it is very easy to handle UI changes across different screen sizes or components. The Build adaptive layouts in Compose guide covers the basics of what you need to know.

Use WindowManager APIs to build responsive UIs

The Jetpack WindowManger library provides a backward-compatible way to work with windows in your app and build responsive UI for all devices. Here’s what’s new.

Activity embedding

Activity embedding lets you take advantage of the extra display area of large screens by showing multiple activities at once, such as for the List-Detail pattern, and it requires little or no refactoring of your app. You determine how your app displays its activities—side by side or stacked—by creating an XML configuration file or making Jetpack WindowManager API calls. The system handles the rest, determining the presentation based on the configuration you’ve created.

Activity embedding works seamlessly on foldable devices, stacking and unstacking activities as the device folds and unfolds. If your app uses multiple activities, activity embedding can enhance your user experience on large screen devices. Try the activity embedding APIs in Jetpack WindowManager 1.0 Beta 03 and later releases. More here.

GIF shows activity embedding with Jetpack WindowManager

Activity embedding with Jetpack WindowManager

Use Window size classes to help detect the size of your window

Window Size Classes are a set of opinionated viewport breakpoints for you to design, develop and test resizable application layouts against. The Window Size Class breakpoints have been split into three categories: compact, medium, and expanded. They have been designed specifically to balance layout simplicity with the flexibility to optimize your app for the most unique use cases, while representing a large proportion of devices in the ecosystem. The WindowSizeClass APIs will be coming soon in Jetpack WindowManager 1.1 and will make it easier to build responsive UIs. More here.

Image compares the width of Window Size Classes by showing compact, medium, and expanded views

Window Size Classes in Jetpack WindowManager

Make your app fold-aware

WindowManager also provides a common API surface for different window features, like folds and hinges. When your app is fold aware, the content in the window can be adapted to avoid folds and hinges, or to take advantage of them and use them as natural separators. Learn how you can make your app fold aware in this guide.

Building and testing for large screens with Android Studio

Reference Devices

Since Android apps should be built to respond and adapt to all devices and categories, we’re introducing Reference Devices across Android Studio in many tools where you design, develop and test UI and layout. The four reference devices represent phones, large foldable inner displays, tablets, and desktops. We’ve designed these after analyzing market data to represent either popular devices or rapidly growing segments. They also enable you to ensure your app works across popular breakpoint combinations with the new WindowSizeClass breakpoints, to ensure your app covers as many use cases as possible.

Image shows reference device definitions for a tablet, phone, foldable, and desktop sizes

Reference Device definitions

Layout validation

If you’re not sure where to get started adapting your UI for large screens, the first thing you can do is use new tools to identify potential issues impacting large screen devices. In Android Studio Chipmunk, we’re working on a new visual linting tool to proactively surface UI warnings and suggestions in Layout Validation, including which reference devices are impacted.

Image shows layout validation panel. The panel shows phone, foldable, tablet, and desktop sizes

Layout validation tool with Reference Device classes

Resizable emulator

To test your app at runtime, we can use the new resizable emulator configuration that comes with Android Studio Chipmunk. The resizable emulator lets you quickly toggle between the four reference devices - phone, foldable, tablet, and desktop. This makes it easier to validate your layout at design time and test the behavior at runtime, both using the same reference devices. To create a new Resizable emulator, use the Device Manager in Android Studio to create a new Virtual Device and select the Resizable device definition with the Android 12L (Sv2) system image.

GIF shows the processs to create a new Resizable emulator

Resizable Android Emulator

Changes to Google Play on large screens

To make it easier for people to find the best app experiences on their tablets, foldables, and ChromeOS devices, we're making changes in Play to highlight apps that are optimized for their devices.

We’re adding new checks to assess each app’s quality against our large screen app quality guidelines to ensure that we surface the best possible apps on those devices. For apps that are not optimized for large screens, we’ll start warning large screen users with a notice on the app’s Play Store listing page.

We'll also be introducing large screen specific app ratings, as announced earlier this year, so users will be able to rate how your app works on their large screen devices. These changes are coming next year, so we're giving you advanced notice to get your apps ready!

Also, make sure to check out our post that highlights how we are evolving our business model to address developer needs in Google Play.


Learn more!

To help you get started with building for large screens and foldables, no matter whether you’re using Views or Compose, we’ve got you covered! We’re launching new and updated guidance on how to support different screen sizes both in a new and in an existing app, how to implement navigation for both Views and Compose, how to take advantage of foldable devices and more. Check them out in the large screens guides section for Views support or in the Compose guides section.

Nothing speaks louder than code - we updated the following samples to support responsive UIs:

For some hands-on work, check out our Support foldable and dual-screen devices with Jetpack WindowManager updated codelab.

Android 12 is live in AOSP!

Posted by Dave Burke, VP of Engineering

Android 12 logo

Today we’re pushing the source to the Android Open Source Project (AOSP) and officially releasing the latest version of Android. Keep an eye out for Android 12 coming to a device near you starting with Pixel in the next few weeks and Samsung Galaxy, OnePlus, Oppo, Realme, Tecno, Vivo, and Xiaomi devices later this year.

As always, thank you for your feedback during Android 12 Beta! More than 225,000 of you tested our early releases on Pixel and devices from our partners, and you sent us nearly 50,000 issue reports to help improve the quality of the release. We also appreciate the many articles, discussions, surveys, and in-person meetings where you voiced your thoughts, as well as the work you’ve done to make your apps compatible in time for today’s release. Your support and contributions are what make Android such a great platform for everyone.

We’ll also be talking about Android 12 in more detail at this year’s Android Dev Summit, coming up on October 27-28. We’ve just released more information on the event, including a snapshot of the technical Android sessions; read on for more details later in the post.

What’s in Android 12 for developers?

Here’s a look at some of what’s new in Android 12 for developers. Make sure to check out the Android 12 developer site for details on all of the new features.

A new UI for Android

Material You - Android 12 introduces a new design language called Material You, helping you to build more personalized, beautiful apps. To bring all of the latest Material Design 3 updates into your apps, try an alpha version of Material Design Components and watch for support for Jetpack Compose coming soon.

image of new UI for Android 12

Redesigned widgets - We refreshed app widgets to make them more useful, beautiful, and discoverable. Try them with new interactive controls, responsive layouts for any device, and dynamic colors to create a personalized but consistent look. More here.

Notification UI updates - We also refreshed notification designs to make them more modern and useful. Android 12 also decorates custom notifications with standard affordances to make them consistent with all other notifications. More here.

Stretch overscroll - To make scrolling your app’s content more smooth, Android 12 adds a new “stretch” overscroll effect to all scrolling containers. It’s a natural scroll-stop indicator that’s common across the system and apps. More here.

App launch splash screens - Android 12 also introduces splash screens for all apps. Apps can customize the splash screen in a number of ways to meet their unique branding needs. More here.

Performance

Faster, more efficient system performance - We reduced the CPU time used by core system services by 22% and the use of big cores by 15%. We’ve also improved app startup times and optimized I/O for faster app loading, and for database queries we’ve improved CursorWindow by as much as 49x for large windows.

Optimized foreground services - To provide a better experience for users, Android 12 prevents apps from starting foreground services while in the background. Apps can use a new expedited job in JobScheduler instead. More here.

More responsive notifications - Android 12’s restriction on notification trampolines helps reduce latency for apps started from a notification. For example, the Google Photos app now launches 34% faster after moving away from notification trampolines. More here.

Performance class - Performance Class is a set of device capabilities that together support demanding use-cases and higher quality content on Android 12 devices. Apps can check for a device’s performance class at runtime and take full advantage of the device’s performance. More here.

Faster machine learning - Android 12 helps you make the most of ML accelerators and always get the best possible performance through the Neural Networks API. ML accelerator drivers are also now updatable outside of platform releases, through Google Play services, so you can take advantage of the latest drivers on any compatible device.

Privacy

image of privacy notification in Android 12

Privacy Dashboard - A new dashboard in Settings gives users better visibility over when your app accesses microphone, camera, and location data. More here.

Approximate location - Users have even more control over their location data, and they can grant your app access to approximate location even if it requests precise location. More here.

Microphone and camera indicators - Indicators in the status bar let users know when your app is using the device camera or microphone. More here.

Microphone and camera toggles - On supported devices, new toggles in Quick Settings make it easy for users to instantly disable app access to the microphone and camera. More here.

Nearby device permissions - Your app can use new permissions to scan for and pair with nearby devices without needing location permission. More here.

Better user experience tools

Rich content insertion - A new unified API lets you receive rich content in your UI from any source: clipboard, keyboard, or drag-and-drop. For back-compatibility, we’ve added the unified API to AndroidX. More here.

Support for rounded screen corners - Many modern devices use screens with rounded corners. To deliver a great UX on these devices, you can use new APIs to query for corner details and then manage your UI elements as needed. More here.

image of phone UI with notification that says hello blurry world

AVIF image support - Android 12 adds platform support for AV1 Image File Format (AVIF). AVIF takes advantage of the intra-frame encoded content from video compression to dramatically improve image quality for the same file size when compared to older image formats, such as JPEG.

Compatible media transcoding - For video, HEVC format offers significant improvements in quality and compression and we recommend that all apps support it. For apps that can’t, the compatible media transcoding feature lets your app request files in AVC and have the system handle the transcoding. More here.

Easier blurs, color filters and other effects - new APIs make it easier to apply common graphics effects to your Views and rendering hierarchies. You can use RenderEffect to apply blurs, color filters, and more to RenderNodes or Views. You can also create a frosted glass effect for your window background using a new Window.setBackgroundBlurRadius() API, or use blurBehindRadius to blur all of the content behind a window.

Enhanced haptic experiences - Android 12 expands the tools you can use to create informative haptic feedback for UI events, immersive and delightful effects for gaming, and attentional haptics for productivity. More here.

New camera effects and sensor capabilities - New vendor extensions let your apps take advantage of the custom camera effects built by device manufacturers—bokeh, HDR, night mode, and others. You can also use new APIs to take full advantage of ultra high-resolution camera sensors that use Quad / Nona Bayer patterns. More here.

Better debugging for native crashes - Android 12 gives you more actionable diagnostic information to make debugging NDK-related crashes easier. Apps can now access detailed crash dump files called tombstones through the App Exit Reasons API.

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. Play as you download will allow game assets to be fetched in the background during install, getting your players into gameplay faster.

Get your apps ready for Android 12

Now with today’s public release of Android 12, we’re asking all Android developers to finish your compatibility testing and publish your updates as soon as possible, to give your users a smooth transition to Android 12.

To test your app for compatibility, just install it on a device running Android 12 and work through the app flows looking for any functional or UI issues. Review the Android 12 behavior changes for all apps to focus on areas where your app could be affected. Here are some of the top changes to test:

  • Privacy dashboard — Use this new dashboard in Settings to check your app’s accesses to microphone, location, and other sensitive data, and consider providing details to users on the reasons. More here.
  • Microphone & camera indicators — Android 12 shows an indicator in the status bar when an app is using the camera or microphone. Make sure this doesn’t affect your app’s UI. More here.
  • Microphone & camera toggles — Try using the new toggles in Quick Settings to disable microphone and camera access for apps and ensure that your app handles the change properly. More here.
  • Clipboard read notification — Watch for toast notifications when your app reads data from the clipboard unexpectedly. Remove unintended accesses. More here.
  • Stretch overscroll — Try your scrolling content with the new “stretch” overscroll effect and ensure that it displays as expected. More here.
  • App splash screens — Launch your app from various flows to test the new splash screen animation. If necessary, you can customize it. More here.
  • Keygen changes — Several deprecated BouncyCastle cryptographic algorithms are removed in favor of Conscrypt versions. If your app uses a 512-bit key with AES, you’ll need to use one of the standard sizes supported by Conscrypt. More here.

Remember to test the libraries and SDKs in your app for compatibility. If you find any SDK issues, try updating to the latest version of the SDK or reaching out to the developer for help.

Once you’ve published the compatible version of your current app, you can start the process to update your app's targetSdkVersion. Review the behavior changes for Android 12 apps and use the compatibility framework to help detect issues quickly.

Tune in to Android Dev Summit to learn about Android 12 and more!

The #AndroidDevSummit is back! Join us October 27-28 to hear about the latest updates in Android development, including Android 12. This year’s theme is excellent apps, across devices; tune in later this month to learn more about the development tools, APIs and technology to help you be more productive and create better apps that run across billions of devices, including tablets, foldables, wearables, and more.

We’ve just released more information on the event, including a snapshot of the 30+ technical Android sessions; you can take a look at some of those sessions here, and start planning which talks you want to check out. Over the coming weeks, we’ll be asking you to share your top #AskAndroid questions, to be answered live by the team during the event.

The show kicks off at 10 AM PT on October 27 with The Android Show, a 50-minute technical keynote where you’ll hear all the latest news and updates for Android developers. You can learn more and sign up for updates here.

Android 12 Beta 5 update, official release is next!

Posted by Dave Burke, VP of Engineering

Android 12 logo

We’re just a few weeks away from the official release of Android 12! As we put the finishing touches on the new version of Android, today we’re bringing you a final Beta update to help you with testing and development. For developers, now is the time to make sure your apps are ready!

You can get Beta 5 today on your Pixel device, including on the Pixel 5a with 5G, by enrolling here for over-the-air updates. If you’re already enrolled, you’ll automatically get the update. You can also try Android 12 Beta 5 on select devices from several of our partners like Sharp. Visit the Android 12 developer site for details.

Watch for more information on the official Android 12 release coming soon!

What’s in Beta 5?

Today’s update includes a release candidate build of Android 12 for Pixel and other devices and the Android Emulator. We reached Platform Stability at Beta 4, so all app-facing surfaces are final, including SDK and NDK APIs, app-facing system behaviors, and restrictions on non-SDK interfaces. With these and the latest fixes and optimizations, Beta 5 gives you everything you need to complete your testing.

timeline

Get your apps ready!

With the official Android 12 release coming next, we’re asking all app and game developers to complete your final compatibility testing and publish your compatibility updates ahead of the final release. For SDK, library, tools, and game engine developers, it’s important to release your compatible updates as soon as possible -- your downstream app and game developers may be blocked until they receive your updates.

To test your app for compatibility, just install it on a device running Android 12 Beta 5 and work through the app flows looking for any functional or UI issues. Review the Android 12 behavior changes for all apps to focus on areas where your app could be affected. Here are some of the top changes to test:

  • Privacy dashboard — A new dashboard in Settings lets users see which apps are accessing which type of data and when. Users can adjust permissions if needed, and they can request details from your app on the reason for access. More here.
  • Microphone & camera indicators — Android 12 shows an indicator in the status bar when an app is using the camera or microphone. More here.
  • Microphone & camera toggles — New toggles in Quick Settings let users instantly disable microphone and camera access for all apps. More here.
  • Clipboard read notification — A toast alerts users when an app reads data from the clipboard unexpectedly. More here.
  • Stretch overscroll — A new “stretch” overscroll effect replaces the previous “glow” overscroll effect systemwide. More here.
  • App splash screens — Android 12 launches apps with a new splash screen animation. More here.
  • Keygen changes — Several deprecated BouncyCastle cryptographic algorithms are removed in favor of Conscrypt versions. If your app uses a 512-bit key with AES, you’ll need to use one of the standard sizes supported by Conscrypt.More here.

Remember to test the libraries and SDKs in your app for compatibility. If you find any SDK issues, try updating to the latest version of the SDK or reaching out to the developer for help.

Once you’ve published the compatible version of your current app, you can start the process to update your app's targetSdkVersion. Review the behavior changes for Android 12 apps and use the compatibility framework to help detect issues quickly.

Explore the new features and APIs

Android 12 has a ton of new features to help you build great experiences for users. Check out our Android 12 Beta 2 post for a recap and links to Android 12 talks at Google I/O. For complete details on all of the new features and APIs, visit the Android 12 developer site.

Also make sure to try Android Studio Arctic Fox with your Android 12 development and testing. We’ve added lint checks to help you catch where your code might be affected by Android 12 changes, such as for custom declarations of splash screens, coarse location permission for fine location usage, media formats, and high sensor sampling rate permission. You can give these a try by downloading and configuring the latest version of Android Studio.

Get started with Android 12!

Today’s Beta 5 release has everything you need to try the 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 Beta 5 on devices from several of our partners like Sharp. For even broader testing, you can try Beta 5 on Android GSI images, and if you don’t have a device, you can test on the Android Emulator. This update 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.

What’s next?

Stay tuned for the official Android 12 launch coming in the weeks ahead! Until then, feel free to continue sharing your feedback through our hotlists for platform issues, app compatibility issues, and third-party SDK issues.

A huge thank you to our developer community for helping shape the Android 12 release! You’ve given us thousands of bug reports and shared insights that have helped us adjust APIs, improve features, fix significant bugs, and in general make the platform better for users and developers.

We’re looking forward to seeing your apps on Android 12!

Android 12 Beta 4 and Platform Stability

Posted by Dave Burke, VP of Engineering

Android 12 logo

Today we’re bringing you the fourth Beta of Android 12, and moving into the final phase of the release. We’ve built Android 12 with a new UI that adapts to you, performance improvements, privacy and security enhancements, and more. We’re now shifting our focus to polish, performance, and stability. Thanks for all the feedback you’ve shared to help us refine the release and get us to this point.

For developers, Beta 4 takes us to Platform Stability, which means that Android 12’s APIs and all app-facing behaviors are finalized. For apps, the focus is now on compatibility and quality. It’s time to start preparing your compatible app updates in time for the official release later in the year.

You can try Beta 4 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 4 on select devices from several of our partners like ASUS, Oneplus, Oppo, Realme, Sharp, and ZTE - learn more at android.com/beta. Visit the Android 12 developer site for details on how to get started.

Platform Stability

Android 12 Beta 4 has reached Platform Stability, a milestone that means all app-facing surfaces and behaviors are now final in Android 12. This includes not only the official SDK and NDK APIs, but also final app-facing system behaviors and restrictions on non-SDK interfaces that may affect apps. So from Beta 4, you can confidently release your compatibility updates knowing that the platform won’t change. More on the timeline is here.

Android 12 timeline

We’re asking all app and game developers to start your final compatibility testing now and prepare to publish your compatibility updates as soon as possible ahead of the final release.

For all SDK, library, tools, and game engine developers, it’s even more important to start testing now and release your compatible updates as soon as possible -- your downstream app and game developers may be blocked until they receive your updates. When you’ve released a compatible update, be vocal and let developers know!

App compatibility

For Android, App compatibility means that your app runs as intended on a new version of the platform. You can check your app’s compatibility just by installing the production version of your app on a device or emulator and testing it - if the app looks good and runs properly, then you’re done, it’s compatible!

Testing your app for compatibility is important because with each release, we make integral changes to the platform that improve privacy and security and the overall user experience across the OS. These can affect your apps, so you should take a look at the behavior changes and test against them, then publish a compatible update to your users. It’s a basic but critical level of quality that ensures users have a good app experience.

As people update their devices to Android 12, they want to explore the latest version of Android, and experience it with their favorite apps. If those apps don’t work properly, it’s a major issue, ultimately resulting in uninstalls.

So while there are a ton of new APIs and capabilities to explore, start by testing your current app and releasing a compatible update first.

Get your apps ready

To test your app for compatibility with Android 12, just install your production app from Google Play or other source onto a device running Android 12 Beta 4. Work through all of the app’s flows and watch for functional or UI issues. Review the Android 12 behavior changes for all apps to focus your testing. Here are some changes to watch for:

  • Privacy dashboard - A new dashboard in Settings lets users see which apps are accessing which type of data and when. Users can adjust permissions if needed, and they can request details from your app on the reason for access. More here.
  • Microphone & camera indicators - Android 12 shows an indicator in the status bar when an app is using the camera or microphone. More here.
  • Microphone & camera toggles - New toggles in Quick Settings let users instantly disable microphone and camera access for all apps. More here.
  • Clipboard read notification - A toast alerts users when an app reads data from the clipboard unexpectedly. More here.
  • Stretch overscroll - A new “stretch” overscroll effect replaces the previous “glow” overscroll effect systemwide. More here.
  • App splash screens - Android 12 launches apps with a new splash screen animation. More here.
  • Keygen changes - Several deprecated BouncyCastle cryptographic algorithms are removed in favor of Conscrypt versions. If your app uses a 512-bit key with AES, you’ll need to use one of the standard sizes supported by Conscrypt. More here.

Remember to test the libraries and SDKs in your app for compatibility. If you find any SDK issues, try updating to the latest version of the SDK or reaching out to the developer for help.

Once you’ve published the compatible version of your current app, you can start the process to update your app's targetSdkVersion. Review the behavior changes for Android 12 apps and use the compatibility framework to help you detect issues quickly. Here are some of the changes to test for (these apply when your app’s targetSdkVersion is 31 or higher):

  • Foreground service launch restriction - Apps can no longer launch foreground services from the background. For high-priority background tasks, use expedited jobs in WorkManager instead. More here.
  • Approximate location - When apps request permission for precise location, users can now choose to grant either precise or approximate location. More here.
  • New permission for exact alarms - Apps that want to use exact alarms must request a new normal permission, SCHEDULE_EXACT_ALARM. More here.
  • Modern SameSite cookie behaviors in WebView - If your app uses WebView, test your app with the new SameSite cookie behaviors. More here.
  • Safer exporting of components - your app must explicitly specify an android:exported attribute for any app components that use intent filters. More here.
  • Custom notifications - The system applies a standard notification template to fully custom notifications, with affordances for app name, app icon, and expand/collapse data. More here.
  • Notification trampolines restriction - Notifications can no longer launch your app using a “trampoline” - an intermediary broadcast receiver or service that starts the target Activity. More here.

During testing, also watch for uses of restricted non-SDK interfaces in your app and move those to public SDK equivalents instead. You can read about the restricted APIs here.

Get started with Android 12!

Today’s Beta release has everything you need to try the 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 4 on devices from some of our partners like ASUS, OnePlus, Oppo, Realme, Sharp, and ZTE. 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 4 on Android GSI images, and if you don’t have a device, you can test on the Android Emulator.

Beta 4 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.

Watch for one more Beta coming in the weeks ahead as a release candidate for your final testing.

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

Android 12 Beta 3 for TV is now available

Posted by Wolfram Klein, Product Manager, Android TV OS

Alongside today’s Android 12 Beta 3 release for mobile, we’re also bringing the third Beta of Android 12 to Android TVs. We’re excited to bring new media features, UI improvements, and privacy controls to the experience with Beta 3 while we continue our work of preparing the full release.

Media

At the heart of the TV experience is beautiful and seamless media playback. In the US, users are spending well over 4 hours a day watching media on TV, and are always asking for the highest resolution playback possible. With Android 12, we are releasing three new features to better support ever-improving picture quality.

  • Refresh Rate Switching Settings: For a smoother viewing experience, Android 12 now supports seamless and non-seamless refresh rate switching. Apps can now integrate these settings for playback of content at optimal frame rates. The Match Content Frame Rate user setting has been added to allow users to control this feature, and apps can call Display.getMode to know if a user’s device supports seamless rate switching.
  • Better display mode reporting: We are improving how TV devices report display modes and making hotplugging behavior more consistent. App developers no longer need to use workarounds for accurately detecting display modes or for handling HDMI hotplug events.
  • Tunnel Mode Updates: Updates to Android’s tunnel mode are making it even easier for app developers to support consistent and efficient playback across devices by reducing media processing overhead in the Android Framework.

User Interface

A beautiful media experience needs an equally stunning user interface to match. Android TV brings two new additions to the UI that help developers provide users with a richer visual experience on high performance devices.

  • Background blurs: Background blurring using RenderEffect (for in-app blurs) and WindowManager (for cross-window blurs) can now be used to easily enhance the visual separation of different UI layers.

Example background blur used to separate UI layers.

  • 4K UI support: For added visual fidelity, Android TV OS now officially supports UI rendering at 4k resolution on compatible devices. 4K UI resolution can be tested in the upcoming Android 12 emulator for TV to allow app developers to prepare their app for devices with the higher resolution.

Privacy and Security

With Android 12, we’re continuing to focus on giving users more transparency and control while keeping their devices and data secure. Beta 3 for TV includes many of the new privacy features from the Android framework.

  • Microphone and camera indicators: Users will now see any time apps are accessing the microphone or camera by showing an indicator on the TV screen. For better visibility of recent app accesses to microphone and camera, users can visit their privacy settings on TV.

Microphone and camera indicators showing during a video call. Video credit: Ekaterina Bolovtsova.

  • Microphone and camera toggles: Two new global privacy settings are now available, allowing the user to easily toggle access to the microphone or camera. When those toggles are disabled, apps will be unable to access microphone audio and camera video.

Microphone access toggle in a user’s global privacy settings.

  • Device Attestation: To assure that your application is running on certified and authentic hardware, the Android KeyStore API has been extended to support attestation of basic device properties.

The Android 12 Beta 3 release for TV is available as a system update to ADT-3 devices today. Also available in the coming weeks, you can use the preview version of the Android 12 emulator to test and build your apps for TV. We hope this helps you test your Android TV app implementations for the next generation of devices. To learn more about getting your Android TV app ready, visit our Android TV OS developers page.

We can’t wait to see what you will build with Android 12 on TV!

Android 12 Beta 3 and final APIs

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.

Android 12 Beta 2 Update

Posted by Dave Burke, VP of Engineering

Android 12 logo

Just a few weeks ago at Google I/O we unwrapped the first beta of Android 12, focusing on a new UI that adapts to you, improved performance, and privacy and security at the core. For developers, Android 12 gives you better tools to build delightful experiences for people on phones, laptops, tablets, wearables, TVs, and cars.

Today we’re releasing the second Beta of Android 12 for you to try. Beta 2 adds new privacy features like the Privacy Dashboard and continues our work of refining the release.

End-to-end there’s a lot for developers in Android 12 - from the redesigned UI and app widgets, to rich haptics, improved video and image quality, privacy features like approximate location, and much more. For a quick look at related Google I/O sessions, see Android 12 at Google I/O later in the post.

You can get Beta 2 today on your Pixel device by enrolling here for over-the-air updates, and if you previously enrolled for Beta 1, you’ll automatically get today’s update. Android 12 Beta is also available on select devices from several of our partners - learn more at android.com/beta.

Visit the Android 12 developer site for details on how to get started.

What’s new in Beta 2?

Beta 2 includes several of the new privacy features we talked about at Google I/O, as well as various feature updates to improve functionality, stability, and performance. Here are a few highlights.

Privacy Dashboard - We’ve added a Privacy Dashboard to give users better visibility over the data that apps are accessing. The dashboard offers a simple and clear timeline view of all recent app accesses to microphone, camera, and location. Users can also request details from an app on why it has accessed sensitive data, and developers can provide this information in an activity by handling a new system intent, ACTION_VIEW_PERMISSION_USAGE_FOR_PERIOD. We recommend that apps take advantage of this intent to proactively help users understand accesses in the given time period. To help you track these accesses in your code and any third-party libraries, we recommend using the Data Auditing APIs. More here.

Privacy Dashboard and location access gif

Privacy dashboard and location access timeline.

Mic and camera indicators - We’ve added indicators to the status bar to let users know when apps are using the device camera or microphone. Users can go to Quick Settings to see which apps are accessing their camera or microphone data and manage permissions if needed. For developers, we recommend reviewing your app’s uses of the microphone and camera and removing any that users would not expect. More here.

Microphone & camera toggles - We’ve added Quick Settings toggles on supported devices that make it easy for users to instantly disable app access to the microphone and camera. When the toggles are turned off, an app accessing these sensors will receive blank camera and audio feeds, and the system handles notifying the user to enable access to use the app’s features. Developers can use a new API, SensorPrivacyManager, to check whether toggles are supported on the device. The microphone and camera controls apply to all apps regardless of their platform targeting. More here.

Clipboard read notification - To give users more transparency on when apps are reading from the clipboard, Android 12 now displays a toast at the bottom of the screen each time an app calls getPrimaryClip(). Android won’t show the toast if the clipboard was copied from the same app. We recommend minimizing your app’s reads from the clipboard, and making sure that you only access the clipboard when it will be expected by users. More here.

More intuitive connectivity experience - To help users understand and manage their network connections better, we’re introducing a simpler and more intuitive connectivity experience across the Status Bar, Quick Settings, and Settings. The new Internet Panel helps users switch between their Internet providers and troubleshoot network connectivity issues more easily. Let us know what you think!

Quick Settings controls

New Internet controls through Quick Settings.

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

Android 12 at Google I/O

At Google I/O we talked about everything that’s new in Android for developers - from Android 12 to Modern Android Development tools, new form factors like Wear and foldables, and Google Play. Here are the top 3 things to know about Android 12 at Google I/O.

#1 A new UI for Android - Android 12 brings the biggest design change in Android's history. We rethought the entire experience, from the colors to the shapes, light and motion, making Android 12 more expressive, dynamic, and personal, under a single design language called Material You.

#2 Performance - With Android 12, we made significant and deep investments in performance, from foundational system performance and battery life to foreground service changes, media quality and performance, and new tools to optimize apps.

#3 Privacy and security - In Android 12 we’re continuing to give users more transparency and control while keeping their devices and data secure.

For an overview of Android 12 for developers, watch this year’s What's new in Android talk, and check out Top 12 tips to get ready for Android 12 for an overview of where to test your app for compatibility. The full list of Android content at Google I/O is here.

App compatibility

With more early-adopter users and developers getting Android 12 beta on Pixel and other devices, now is the time to make sure your apps are ready!

To test your app for compatibility, 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. There’s no need to change your app’s targetSdkVersion at this time, so when you’ve resolved any issues, publish an update as soon as possible for your Android 12 Beta users.

timeline for Android 12

With Beta 2, Android 12 is closing in on Platform Stability in August 2021. Starting then, app-facing system behaviors, SDK/NDK APIs, and non-SDK lists will be finalized. At that time, you should finish up your final compatibility testing and release a fully compatible version of your app, SDK, or library. More on the 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 2 on devices from some of our top device-maker partners like Sharp. 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 2 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.

What’s new in Android Privacy

Posted by Sara N-Marandi, Product Manager, Android Platform Product

Android privacy

People want an OS and apps that they can trust with their most personal and sensitive information. Privacy is core to Android’s product principles. As shared in the “What’s new in Android Privacy” session, Android 12 continues to expand on this existing foundation by making the platform even more private.

This release will give users more transparency around the data being accessed by apps while providing simple controls to make informed choices. Android is also investing in reducing the scope of permissions so that apps only have access to the data they need for the features they provide. Let’s look at some of these important changes we’ve made in Android 12 to protect user privacy.

Privacy dashboard: Users often tell us that they want to understand what data apps use. With the new Privacy Dashboard, users will have a simple and clear timeline view of the last 24 hour accesses to location, microphone and camera. You can also share more context about your app’s data usage with a new permission intent API in Android 12. The Privacy dashboard will be available to try in Beta 2.

We encourage all developers to review your code and understand data access needs, including those in third-party SDKs, and make sure all accesses have justifiable use cases. To help with that, in Android 11 we added Data access auditing APIs to make it easy for you to audit your current data access. Use the APIs to untangle mapping of your code by tracking which part of your code accesses private data. The Privacy dashboard will be available to try in Beta 2.

Privacy dashboard and location access timeline

Figure 1. Privacy dashboard and location access timeline in the past 24 hours.

Microphone and camera indicators: In Android 12 we’re adding transparency to microphone and camera access. Going forward, users will know in real time when an app accesses their microphone or camera feeds. By simply going into Quick Settings, users can view the apps accessing their data. If the access is unwarranted, users can quickly navigate to the app permission page to revoke permissions.

Developers should review their use of microphone and camera and proactively remove unexpected access. For example, you should ensure that your app does not access these sensors before the user clicks on a feature that needs access. The Microphone and camera indicators will be available to try in Beta 2.

 Microphone and camera indicators and toggles

Figure 2. Microphone and camera indicators and toggles.

Microphone and camera toggles: You may have seen people placing stickers on cameras or plugging audio blockers into their phones. In Android 12, we’re introducing two new controls that allow users to quickly and easily cut off apps’ access to the microphone and camera on the device. To ensure user safety, emergency calls will be exempted.

If an app with permissions attempts to access the microphone or camera but the user has the sensors turned off, the system will display a message to inform the user that they must turn the sensors back on in order to use the app’s features. If your app follows permissions best practices, then you don’t need to do anything different to incorporate the toggle state. The Microphone and camera toggles will be available to try in Beta 2.

Approximate location: Over the last two releases, we’ve made location permission fine grained. First, we separated background and foreground access. Then, we added an “only this time” option to further restrict access to background location. We’re seeing users respond positively to these controls and are choosing them more often. When given the option, users elect to share less through foreground location access about 80% of the time.

In Android 12, we will give users more control over their location data. Users will have a clear choice regarding the precision of location provided to the app by selecting approximate location.

We encourage you to review your use case for location and request ACCESS_COARSE_LOCATION if your features don’t need the user’s precise location. You should also be prepared for users to reduce location precision. Please make sure your app still works when users select approximate. Approximate location will be available to try in Beta 1.

Location permission request dialog with approximate and precise selection

Figure 3. Location permission request dialog with approximate and precise selection

Clipboard read notification: Content copied to the clipboard can contain sensitive information as users frequently copy emails, addresses, and even passwords. Android 12 notifies users every time an app reads from their clipboard. Users will see a toast at the bottom of the screen each time an app calls getPrimaryClip() . The toast won’t appear if clipboard data originates from the same app. You can minimize access by first checking getPrimaryClipDescription() to learn about the type of data in the clipboard. The recommended best practice is to only access the clipboard when the user understands why the access occured. Clipboard read notification will be available to try in Beta 2.

Nearby device permissions: Android 12 minimizes data access by adding a new runtime permission for nearby experiences that do not use location. Up until now, apps such as watch and headphone companion apps required the location permission to scan for nearby Bluetooth devices for pairing. We heard from users and developers that this was confusing and led to granting the permission to access location data when it wasn’t needed. For apps targeting Android 12, you’ll have the option to decouple nearby device discovery from the fine location permission for use cases like pairing devices by using the new BLUETOOTH_SCAN permission and by declaring usesPermissionFlags=neverForLocation . Once the device is paired, apps can use the new BLUETOOTH_CONNECT permission to interact with it. Apps that use Bluetooth scanning for location must still have the location permission. Nearby device permissions will be available to try in Beta 1.

App hibernation: Last year we launched permissions auto-reset. If an app isn’t used for an extended period of time, Android automatically revokes permissions for the app. In the last 14 days permissions were reset for 8.5M apps. This year we’re building on permissions auto-reset by intelligently hibernating apps that have gone unused for an extended period - optimizing for device storage, performance and safety. The system not only revokes permissions granted previously by the user, but it also force-stops the app and reclaims memory, storage and other temporary resources. Users can bring apps out of hibernation simply by launching the app. App hibernation will be available to try in Beta 1.

Android 12 is our most ambitious privacy release to date. Along the way, we have engaged closely with our developer community to build a platform that puts privacy at the forefront while taking into consideration the impact on developers. We thank you for your continued feedback and support in making our platform private and safe for everyone. Learn more about these changes on the developer site.

What’s new in Android 12 Beta

Posted by Dave Burke, VP of Engineering

Android 12 logo

Today at Google I/O we unveiled the first Beta of Android 12, one of our most ambitious releases ever. We focused on a new UI that adapts to you, improving performance, with privacy and security at the core. For developers, we’re giving you more tools to build delightful experiences for people on phones, laptops, tablets, wearables, TVs, and cars.

There’s a lot to explore in Beta 1, starting with the most significant UI update to Android yet, created with a design language that we call Material You. There are new privacy features to try too, like approximate location, and a new standard called Performance Class that lets apps and users identify high-performing devices.

Try Android 12 Beta today on Pixel devices by enrolling here. Thanks to our device-maker partners who are working to accelerate updates, you can now get the Beta on other devices as well, including select devices from ASUS, OnePlus, Oppo, Realme, Sharp, TCL, Transsion, Vivo, Xiaomi, and ZTE, with others on the way. Visit android.com/beta to learn more.

Read on for more highlights of what’s new and visit the Android 12 developer site for details on everything in Android 12 and how to get started developing.

A new UI for Android

As we highlighted in our consumer blog post, Android 12 brings the biggest design change in Android's history. We rethought the entire experience, from the colors to the shapes, light and motion, making Android 12 more expressive, dynamic, and personal. This work is being done in deep collaboration between our software, hardware and Material Design teams, and we’re unifying our software and hardware ecosystems under a single design language called Material You.

Android 12 UI

We’ve extended the new design language across the platform and UI components, so your apps will get these upgrades automatically.

Redesigned widgets - Along with the design changes in Android 12 we’ve refreshed app widgets to make them more useful, beautiful, and discoverable. We added new interactive controls like checkboxes, switches, and radio buttons and made personalizing widgets easier. Android 12 widgets look great with our system UI and themes, with rounded corners and padding automatically adapted to every launcher and home screen. Responsive layouts let you adapt widgets to phones, tablets, foldables, and other screens. We also added dynamic color APIs so your widgets can use system colors to create a personalized but consistent look. And we’re making widgets easier to discover through an improved widget picker and an integration with the Assistant. Check out sample code and give the updated widgets a try. More here.

widgets in Android 12

Stretch overscroll - We’re also adding a new system-wide “stretch” overscroll effect to let users know they’ve scrolled past the end of the available content in your UI. The stretch effect provides a natural vertical and horizontal scroll-stop indicator that’s common across all apps, and it’s enabled by default for scrolling containers across the platform and AndroidX. The new stretch overscroll replaces the glow overscroll supported in previous versions. Make sure to test your apps and content with the new scrolling behavior, and if needed you can opt out. More here.

Smoother audio transitions - UI isn't just about the visuals. We've also improved the way that audio focus is handled. When an app loses audio focus, its audio is automatically faded out, providing a smoother transition between apps which play audio, and preventing apps from playing over each other. This is particularly relevant in foldable and multi-screen Android environments. More here.

Performance

With Android 12, we’ve made significant and deep investments in performance - from foundational performance that makes the system and apps faster and smoother, to a new standard for high-performing devices that helps developers deliver richer experiences on those devices.

Faster, more efficient system performance - We reduced the CPU time needed 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 big cores by the system server by 15% to help devices run longer before needing to charge.

Sampled rate , omn big core

We improved transitions and app startup times by reducing lock contention and latency variability, and we optimized I/O for faster app loading. In PackageManager, a read-only snapshot reduced lock contention by as much as 92%. In Binder, lightweight caching radically improved latencies up to 47x in targeted calls. In I/O, we accelerated dex/odex/vdex files to improve app load times, especially on low-memory phones. Our restriction on notification trampolines also helps reduce latency for apps started from a notification. For example, the Google Photos app now launches 34% faster after moving away from notification trampolines.

To improve database query performance we’ve optimized CursorWindow by inlining results in Binder transactions. For small windows, CursorWindow is 36% faster, and for windows over 1000 rows the improvements are as high as 49x.

Performance class - Starting with Android 12 and working together with our ecosystem partners, we’re introducing a common standard for high-performing Android devices.

This standard, called performance class, defines a set of capabilities that go beyond Android's baseline requirements. Devices that meet the performance class requirements can support more demanding use-cases and deliver higher quality content. Developers can check for performance class at runtime and then reliably deliver enhanced experiences that take full advantage of the device’s performance.

Initially, we’re focusing performance class capabilities on media use-cases, with requirements including camera startup latency, codec availability and encoding quality, as well as minimum memory size, screen resolution and read/write performance. More here.

Private by design

Privacy is at the heart of everything we do, and in Android 12 we’re continuing to give people more transparency and control while keeping their devices and data secure. Today we announced several new privacy features that will be coming in Beta 2 - Privacy Dashboard, microphone and camera indicators, and microphone and camera toggles. Stay tuned for more on these features. Here’s what’s new in Beta 1.

App hibernation - Last year we launched permissions auto-reset, and over the last two weeks, Android has reset permissions for over 8.5 million apps that weren’t being used - so apps that people have forgotten about can’t still access their data. In Android 12 we’re building on permissions auto-reset by intelligently hibernating apps that have gone unused for an extended period - optimizing for device storage, performance and safety. Hibernation not only revokes permissions granted previously by the user, but it also force-stops the app and reclaims memory, storage and other temporary resources. In this state the system also prevents apps from running jobs in the background or receiving push notifications, helping to keep users safe. Hibernation should be transparent for most apps, but if needed, direct users to Settings to turn off this feature for your app. More here.

Android 12 device location

Nearby device permissions - Previously, Bluetooth scanning required apps to have the location permission, which was a challenge for apps that needed to pair with nearby devices but didn’t actually need the device location. We’re now allowing apps to scan for nearby devices without needing location permission. Apps targeting Android 12 can scan using the new BLUETOOTH_SCAN permission with the usesPermissionFlags="neverForLocation" attribute. After pairing with a device, use the BLUETOOTH_CONNECT permission to interact with it. These permissions promote privacy-friendly app design while reducing friction for apps. More here.

Approximate location - Recently we’ve given people better ways to manage access to location, such as through separate permissions for foreground and background access and an “only this time” option. Now for apps targeting Android 12, we’re offering even more control with a new “approximate location” option. When apps request precise location data, users can now choose to grant either precise or approximate location. Users can also change an app’s location precision at any time from Settings. If your app requests precise location data (ACCESS_FINE_LOCATION), keep these changes in mind and make sure your app functions properly with approximate location only. For almost all general uses of location, we recommend asking for approximate location (ACCESS_COARSE_LOCATION) only. More here.

App compatibility

If you haven’t tested your app for compatibility with Android 12 yet, now is the time to do it! With Android 12 in Beta, we’re opening up access to early-adopter users as well as developers, on Pixel and other devices. This means that in the weeks ahead, expect many more users to be trying your app on Android 12 and raising any issues that they find.

To test for compatibility, install your published app from Google Play or other source on a device or emulator running Android 12 Beta and work through all of the app’s flows. Review the behavior changes to focus your testing. After you’ve resolved any issues, publish an update as soon as possible.

With Beta we’re getting closer to Platform Stability in August 2021. Starting then, app-facing system behaviors, SDK/NDK APIs, and non-SDK lists will be finalized. At that time, finish up your final compatibility testing and release a fully compatible version of your app, SDK, or library. More on the timeline for developers is here.

timeline

Get started with Android 12!

Today’s Beta release has everything you need to try the Android 12 features, test your apps, and give us feedback. Just enroll any supported Pixel device here to get the update over-the-air. If you’ve already installed a preview build, you’ll automatically get Beta updates. To get started developing, set up the SDK.

You can also get Android 12 Beta on devices from some of our top device-maker partners who are participating in the Android 12 Developer Preview program. Visit android.com/beta to see the full list of partners, with links to their sites with details on their supported devices. Each partner will handle their own enrollments and support, and provide the Beta updates to you directly.

For even broader testing on supported devices, try Android 12 Beta on Android GSI images, and if you don’t have a device you can test on the Android Emulator -- just download the latest emulator system images via the SDK Manager in Android Studio.

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