By Stephanie Cuthbertson, Director of Product Management
Android 11 is coming! Today we are pushing the source code to the Android Open Source Project (AOSP), officially bringing you the latest version of Android. When we built Android 11, we focused on three themes: human-centered communication, fast access and flexible control over all smart devices, and privacy security that gives users more control over how data is shared on their devices. Read our official blog post for details.
For developers, Android 11 brings a host of new features, including session notifications, device and media controls, single permissions, enhanced 5G support, IME switching effects, and more. To help you move faster, we’ve added new tools such as compatibility switches, ADB incremental installation, application exit reason apis, data access auditing apis, Kotlin nullability annotations, and more. It’s all about getting developers to love Android 11, and we’re excited to see your work on it!
The official version of Android 11 is also coming to devices near you, with the Pixel 2, 3, 3A, 4 and 4A series of devices getting updated today. Check out the Android 11 developer website for details.
People oriented, flexible control and privacy security
With the person this
Android 11 is about being human and communicating well. We’ve reshaped the way you communicate on your phone and enabled the operating system to identify the people who are most important to you so you can reach them faster. For developers, Android 11 can help you achieve deeper conversations and more personalized interactions in your apps.
-
Session notifications are displayed in a dedicated area at the top of the notification bar. They are designed to highlight contact objects and provide session-specific actions, such as opening a chat as Bubbles, creating session shortcuts on the home screen, and setting reminders.
-
Bubbles allows users to keep conversations visible and interactive while multitasking on their phones. Messaging and chat apps can provide this new experience on Android 11 through the Bubbles API, which is based on notifications.
-
Keyboard prompt integration allows the auto-fill application and IME (input method editor) to safely provide the user with context-based entities and strings in the IME suggestion bar, making typing easier.
△ Bubbles and Human-centered conversations
Flexible control
Android 11 gives users quick access to all their smart devices and centralized control over them. Developers can use a new API to help users control smart devices and manage media playback:
- Device Controls enables users to access and control their connected devices faster and more easily. Just long press the power button can call up the device control menu, one-stop equipment control. Applications can also appear in the control menu through the new API. Please visit the official documentation for details.
- Media Controls allows users to more quickly switch between audio and video content playback devices — whether headphones, microphones or TVS. Please visit the official documentation for details.
Device control and media control
privacy
With Android 11, we’ve given users more control over how to manage sensitive permissions. We will also continue to ensure device security through more rapid updates.
Single Authorization – Users can now grant applications one-time access to the device’s microphone, camera, or location information. The application needs to request permission again the next time it is used. Please visit the official documentation for details.
△ Single authorization dialog box in Android 11
Background Location – Accessing background location information now requires the user to go further than granting runtime permissions. If your application needs to access background location information, the system will require that you first request foreground location permission. You can further request access to background location information through a separate permission request, which takes the user to the Settings page for authorization.
It’s also important to note that in February, we announced that Google Play developers would need to obtain approval before allowing apps to access location information in the background to prevent abuse. We are now giving developers more time to make changes and will not force existing apps to comply with this policy until 2021. Please visit the official documentation for details.
Automatic Permission Reset – If a user has not used an app for a long time, Android 11 will “automatically reset” all run-time permissions associated with the app and notify the user. The next time a user uses the application, the application can request permission again. Please visit the official documentation for details.
Partitioned storage – We’ve been working to better protect application and user data on external storage, and have added more improvements to make it easier for developers to migrate. Please visit the official documentation for details.
Google Play Update – Since its release last year, the Google Play Update has enabled us to update core OS components more quickly and across many devices in the Android ecosystem. In Android 11, the number of updatable modules has more than doubled, with 12 new updatable modules, bringing greater privacy, security, and consistency to both users and developers.
BiometricPrompt API – Developers can now specify the type of biometric authentication strength required by their applications to unlock or access sensitive content in their applications through the BiometricPrompt API. For downward compatibility, we’ve added these features to the Jetpack Biometric development library. We will bring you further updates as the work progresses.
Identity Credential API – This API will bring new usage scenarios including driver’s licenses, national id cards and digital ID cards. We are working with various government agencies and industry partners to ensure Android 11 is ready for a digital identity experience.
Read more about Android 11’s privacy features here.
Practical innovation
Stronger 5G support – Android 11 allows developers to take advantage of faster speeds and lower latency on 5G networks. You can know when a user is connected to a 5G network, see if the connection is billed, and estimate the bandwidth of the connection. To help you instantly build a 5G experience, we’ve also added 5G support to the Android Emulator. Visit the 5G Developer page to learn how to use 5G features on Android.
— Bringing high-speed experience out of your home, 5G will make your mobile experience more smooth, allowing you to interact with your surroundings, friends and family and meet the needs of your work
New screen types – Device makers continue to innovate and bring new screen forms to market, including hole-in and waterfall screens. Android 11 has added support for these screens to the platform and provides apis for optimizing your application. You can manage the hole and waterfall screens through the existing Display Cutout API. You can use the entire waterfall screen by setting new window layout properties, and manage interactions near the edge of the screen through the Waterfall Insets API.
Call Filtering Service – Android 11 can help call filtering apps better manage unwanted calls. The app in the call details obtains the STIR/SHAKEN status of the call (a standard that prevents call ID fraud) and reports the reason for the rejected call. The app can also customize the system-provided Post Call screen to enable users to perform actions such as “flag the caller as a nuisance call” or “add to contact”.
Optimization and quality
Operating System Resiliency – In Android 11, we made the operating system more dynamic and resilient overall by tweaking memory reclamation operations, such as forcing processes to restart based on RSS HWM thresholds that users can’t perceive. In addition, to improve performance and memory usage, Android 11 also adds Binder caches to optimize high-usage IPC calls by caching system services that retrieve relatively static data. Binder caches also extend battery life by reducing CPU time.
Syncing IME Switching Effects – This is a new set of apis that allow you to synchronize the content in your app as the IME (input method editor, also known as soft keyboard) and system bar enter and exit the screen, making it easier to create natural, intuitive, and smooth IME switching effects. In order to ensure that when switching do frame by frame accurately, a new WindowInsetsAnimation. Callback API will be in the system bar or IME mobile frame by frame to inform application side lining the change. In addition, you can through the new UI WindowInsetsAnimationController API control system, including the system bar, the IME, flow pattern, etc. Read this blog post to learn more.
Delta on the left side of the signal: the edge line zone animation listener realize IME synchronization switching effect Hint: on the right side by WindowInsetsAnimationController application driven IME experience
The HEIF Animation Drawable Object – ImageDecoder API now allows you to decode and render animation of image sequences stored in HEIF files, making it easy for you to introduce high-quality footage while minimizing traffic consumption and APK size. HEIF image sequences can significantly reduce file size compared to GIF animations.
Native Image Decoder – Applications can use the new NDK API to decode and encode images (such as JPEG, PNG, WebP) through native code for graphics or post-processing, and keep the APK size small because you don’t have to bundle an external code base. Native decoders can also benefit from Android’s ongoing platform security updates. Sample NDK code is provided as a reference.
Low Latency Video Decoding in MediaCodec – Low latency video is critical for real-time video streaming applications and services such as Stadia. Video codecs that support low delay playback return the first frame of the stream as soon as the decoding begins. Applications can use the new API to check and configure low-latency playback for specific codecs.
Variable Refresh Rate – Apps and games can now set the preferred frame rate for their Windows through the new API. Most Android devices update their screens at a refresh rate of 60Hz, but some devices support multiple refresh rates, such as 90Hz and 60Hz, and can be switched at run time. On these devices, the system selects the best refresh rate for the application based on the preferred frame rate. You can use the API through the SDK and NDK. Please visit the official documentation for details.
Dynamic Resource Loader – Android 11 provides a new public API for dynamically loading resources and materials at runtime. With the Resource Loader framework, you can include a basic set of resources in your application or game and then load additional resources at run time as needed or change loaded resources.
Neural Networks API (NNAPI) 1.3 — We continue to add operators and controls to support machine learning on Android devices. To optimize common usage scenarios, NNAPI 1.3 adds apis for priorities and timeouts, memory domains, and asynchronous instruction queues. New operators support advanced models with asymmetric quantization of signed integers and branching and looping, while hard-swish operators can be used to accelerate visual models on next-generation devices (such as MobileNetV3).
Developer Experience
Apply compatibility Tools – We try to make most Android 11 behavior changes optional to minimize compatibility impacts, and these changes won’t take effect unless you set the application’s targetSdkVersion to 30. If you are publishing your app through Google Play, you have more than a year to opt in to support these changes, but we recommend starting testing early. To help you test, Android 11 allows you to turn many of these changes on or off individually. Please visit the official documentation for details.
Application Exit reason – It is important to understand the application exit reason and the status at the time. This includes the device type, memory configuration, and running scenario of the application. Android 11 makes this easier with the Exit reason API: You can use this API to view details of your app’s recent exit.
Data Access Auditing – Data access auditing gives you a better understanding of how your application accesses user data and the user processes that access comes from. For example, it can help you identify unintentional private data access, whether it comes from your own code or another SDK. Please visit the official documentation for details.
ADB Incremental – Using ADB (Android Debug Bridge) to install bulky APK during development can be slow and affect your productivity, especially for Android game developers. Android 11 brought ADB Incremental, which is now up to 10 times faster to deploy large APKs (2GB +) from the development machine to Android 11 devices. Please visit the official documentation for details.
Kotlin nullability Annotations – Android 11 adds nullability annotations to more methods in the public API. Furthermore, it upgrades some existing annotations from warnings to errors. This helps you find problems at build time rather than at run time. Read more.
Get your apps ready for Android 11
Android 11 is almost in your hands, so now is the time to complete your compatibility testing and release the update.
Focus first on behavior changes for all applications:
Here are the behavioral changes to watch out for first (regardless of targetSdkVersion you apply):
- Single Access – Users can now grant single access to location information, device microphone, and camera. Please visit the official documentation for details
- External storage access permission – An application cannot access files of other applications in the external storage space. Please visit the official documentation for details
- Scudo Hardened locator – Now it is the heap memory Allocator for in-application native code. Please visit the official documentation for details
- File Descriptor troubleshooter – This feature is now enabled by default to detect file descriptor handling errors in application native code. Please visit the official documentation for details:
There are also many optional behavior changes that Android 11 supports – your app will only be affected if it is released for a new platform. We recommend evaluating these changes as soon as possible after you release a compatible version of your application. For more information about compatibility tests and tools, check out the Android 11 compatibility resources and visit the Android 11 developer website for technical details.
Improve your application with new features and apis
When you’re ready, dig into Android 11 and learn about the new features and apis you can use. Here are some key features that you can prioritize.
We recommend that all apps support these features:
- Dark Themes (supported since Android 10) – Ensure a consistent experience for users with system-wide Dark themes enabled by adding Dark themes or enabling Force Dark.
- Gesture navigation (available since Android 10) – Please support gesture navigation, including providing an immersive edge-to-edge experience and ensuring that custom gestures work well with default gestures. Please visit the official documentation for details:
- Shared Shortcuts (supported since Android 10) – Apps that want to receive shared data should use the Shared shortcuts API to create shared targets. Apps that want to send shared data should make sure to use Android Sharesheet.
- Synchronize IME Switching effects – Use the new WindowInsets and related apis to provide users with smooth switching effects. Read this blog post for details.
- New screen types – For gouge or waterfall devices, be sure to test and adjust your content for these screens as needed. Please visit the official documentation for details.
We also recommend these features if they fit into your app experience:
-
Conversation – messaging and communication applications can integrate the user’s conversation experience by providing long-acting shared shortcuts and presenting pairs of conversations in notifications. Please visit the official documentation for details.
-
Chat Bubbles (Bubbles) – Bubbles can keep conversations visible and available while multitasking. The application implements this functionality through the Bubbles API based on notifications.
-
5G – If your app or content can take advantage of 5G’s faster speeds and lower latency, check out our developer resources to start building 5G experiences.
-
Device Control – If your app supports external smart devices, make sure they are accessible from the new Android 11 Device Control menu. Please visit the official documentation for details.
-
Media Control – For media applications, we recommend supporting Android 11 media Control so that users can manage media playback from the Quick Settings menu. Please visit the official documentation for details.
You can go to the developer. The android. Google. Cn / 11 for more information about the android 11 function.
Android 11 is coming to a device near you!
Android 11 will roll out today on selected Pixel, OnePlus, Xiaomi, OPPO and RealMe phones, with more partners launching and upgrading devices in the coming months. If you own a Pixel 2, 3, 3A, 4 or 4A series phone, including those participating in this year’s Beta testing program, stay tuned for upcoming OTA updates!
The Pixel device’s Android 11 factory OS image is also available through the Android Flash Tool, which you can also download here. As always, you can get the latest Android emulator system image through the SDK Manager in Android Studio. If you want to do more extensive testing on other Treble compatible devices, you can get the Common System Image (GSI) here.
If you need the source code for Android 11, you can get it at this address under the Android 11 branch of the Android open source project repo.
What’s next?
We will soon close the preview issue feedback channel and remove open bugs for developer preview or Beta releases. If you find any problems that were previously submitted during the preview release, please submit a new Bug report for Android 11 on the AOSP Issue feedback form. We look forward to your continued feedback!
Thanks again to the many developers and early adopters who participated in the preview program this year! People gave us great feedback and helped us polish the product. It’s the thousands of bug reports that have made Android 11 a better, more user-friendly platform.
Look forward to seeing your apps on Android 11!