Android 11 introduces great new features and APIs for users and developers. This document highlights what's new for developers.
To learn about the new APIs, read the API diff report, or visit the Android API reference—new APIs are highlighted for visibility. Also, to learn about areas where platform changes may affect your apps, be sure to check out Android 11 behavior changes for apps that target Android R and for all apps), as well as privacy changes.
Data access auditing
To provide more transparency into how your app and its dependencies access private data from users, Android 11 introduces data access auditing. By using this feature, you can better identify and rectify potentially unexpected data access.
To learn more about this feature, read the data access auditing section on the page that discusses privacy changes related to permissions.
Performant graphics debug layer injection
Applications can now load external graphics layers (GLES, Vulkan) into native application code to expose the same functionality as a debuggable app, but without incurring the performance overhead. This feature is especially important when profiling your application with tools like GAPID. To profile your app, include the following meta-data element in your app manifest file instead of making the application debuggable:
<application ... > <meta-data android:name="com.android.graphics.injectLayers.enable" android:value="true" /> </application>
Batch operations for media files
For consistency across devices and added user convenience,
Android 11 adds several methods to the
MediaStore API. To learn more about
these methods, see the perform batch
operations section on the
Android 11 privacy page related to storage.
Rich media in quick replies
Beginning in Android 11, users can insert images and other rich media content
into quick replies. To
support this feature, apps need to add information to
RemoteInput notifications specifying
which MIME types they can handle. Do this by calling
The app must also check
RemoteInput broadcasts that it receives to see if the broadcast
contains content in any of those types; use
to do this.
Access to media files using raw file paths
Starting in Android 11, apps that have the
permission can read a device's media files using direct file paths and native
libraries. To learn more about this capability, see the access files using
raw paths section on the
Android 11 privacy page related to storage.
Secure sharing of large datasets
In some situations, such as those that involve machine learning or media playback, your app might want to use the same large dataset as another app. In previous versions of Android, your app and another app would each need to download a separate copy of the same dataset.
To help reduce data redundancy, both over the network and on disk, Android 11 allows these large datasets to be cached on the device using shared data blobs. To learn more about sharing datasets, see the in-depth guide on sharing large datasets.
Requesting and checking for low latency support
Certain displays can perform graphics post-processing, such as some external displays and TVs. This post-processing improves the graphics but can increase latency. Newer displays which support HDMI 2.1 have an auto low latency mode (ALLM, also known as game mode), which minimizes latency by switching off this post-processing. For more details on ALLM, refer to the HDMI 2.1 specification.
A window can request that auto low latency mode be used, if it is available. ALLM is particularly useful for applications like games and videoconferencing, where low latency is more important than having the best possible graphics.
To toggle minimal post-processing on or off, call
or set the window's
true. Not all displays support minimal
post-processing; to find out if a particular display does support it, call the
Low-latency decoding in MediaCodec
Android 11 enhances
to support low-latency decoding for games and other real-time apps. You can
check whether a codec supports low-latency decoding by passing
To turn low-latency decoding on or off, do either of the following:
- Set the new key
KEY_LOW_LATENCYto 0 or 1 using
- Set the new parameter key
PARAMETER_KEY_LOW_LATENCYto 0 or 1 using
NDK image decoder
ImageDecoder API provides a
standard API for Android C/C++ apps to decode images directly. App developers no
longer need to use the framework APIs (via JNI) or bundle third-party
image-decoding libraries. For more information, see the
Image decoder developer guide.
Android 11 introduces a new API that allows apps to dynamically
extend how resources are searched and loaded. The new API classes
are primarily responsible for providing the new functionality. Together, they
provide the ability to supply additional resources and assets, or modify the
values of existing resources and assets.
ResourcesLoader objects are containers that supply
to an app's
Resources instance. In
ResourcesProvider objects provide methods to load resource data from
APKs and resource tables.
One primary use case for this API is custom asset loading. You can pair an
instance of the new API class
ResourcesProvider to redirect the resolution of file-based resources
and assets, searching a specific directory rather than the application APK. You
can access these assets through the
open() family of methods from the
API class, just like with assets bundled in the APK.
Updates to the ICU libraries
Android 11 updates the
android.icu package to use version 66
ICU library, compared to version
63 in Android 10. The new library version includes updated CLDR locale data
and a number of enhancements to internationalization support in Android.
Notable changes in the new library versions include the following:
- Many formatting APIs now support a new return object type that extends
LocaleMatcherAPI is enhanced with a builder class, support for the
java.util.Localetype, and a result class featuring additional data about a match.
- Unicode 13 is now supported.
Neural Networks API 1.3
Android 11 expands and improves the Neural Networks API (NNAPI).
NNAPI 1.3 introduces a new operand type,
support TensorFlow Lite's new quantization
Additionally, NNAPI 1.3 introduces the
New ML controls
NNAPI 1.3 introduces new controls to help machine learning run smoothly:
QoS API: The new Quality of Service API includes support for prioritization and task deadlines in NNAPI with the following new functions:
Memory domain input/output: NNAPI 1.3 includes support for memory domains as input and output to execution. This removes unnecessary copies of the same data among different system components, improving the runtime performance of Android neural networks. This feature adds a set of new NDK APIs for use with
ANeuralNetworkMemoryobjects, including the following functions:
To learn more, see the neural network memory domain sample.
Biometric authentication strength
To help you control the level of security for your app's data,
Android 11 introduces the
interface. This interface defines the possible strengths of biometric hardware
elements. The device manufacturer defines a specific strength for each element,
These strength levels are defined on the
Your app can use the
BiometricManager.Authenticators interface as follows:
canAuthenticate()method has one argument: an integer or a bitwise combination of strength levels from
BiometricManager.Authenticators. The overloaded version of
canAuthenticate()that takes no arguments is deprecated as of Android 11.
setAllowedAuthenticators()method requires your app's biometric authentication to rely on a biometric element that has one of the specified strength levels.
setAllowedAuthenticators()methods can both accept the
Authenticators.DEVICE_CREDENTIALargument, which allows for authentication using a PIN, pattern, or password. As a result, the related method
setDeviceCredentialAllowed()is deprecated as of Android 11.
ACTION_BIOMETRIC_ENROLLintent action invokes system settings and requests the user to enroll a biometric hardware element. You can provide the strength level as an extra.
Additionally, as of Android 11, the
allows you to check whether the user authenticated using biometric or device
credentials. To check, call
Starting in Android 11, a CallScreeningService can request information about the STIR/SHAKEN verification status (verstat) for incoming calls. This information is provided as part of the call details for incoming calls.
CallScreeningService holds the
permission, the app is notified when there are incoming calls from, or
outgoing calls to, a number in the user's contacts.
Expanded camera support in Android emulator
Android 11 introduces improved Android Emulator camera capabilities. The added features include the following:
- RAW capture
- YUV reprocessing
- Level 3 devices
- Logical camera support
Mute notification sounds and vibrations during active capture
Beginning with Android 11, when actively using the camera, your
app can mute only vibrations, both sounds and vibrations, or neither using
Wi-Fi Passpoint enhancements
Passpoint enables apps to automatically and silently perform authentication and connect to secure Wi-Fi hotspots. Apps that target API level 'R' and higher can use the following additional capabilities of Passpoint.
- Expiration date enforcement and notification
- Enforcing expiration dates on profiles allows the framework to avoid auto-connection to access points with expired credentials, which are destined to fail. This prevents airtime usage, and saves battery and backend bandwidth. It displays a notification to the user when their profile is in range and has expired.
- FQDN Matching
- Allow configuration of a named AAA domain separately from an Access Network Query Protocol (ANQP) fully qualified domain name (FQDN), using an Extension/Android node in PerProviderSubscription (PPS) Management Object (MO).
- Self-signed private CAs
- For Passpoint R1 Profiles, Android accepts private self-signed CAs for connection authentication.
Wi-Fi Suggestion API is expanded
Android 11 expands the Wi-Fi Suggestion API to increase your app's network management capabilities, including the following:
- Connectivity management apps can manage their own networks by allowing disconnection requests.
- Passpoint networks are integrated into the Suggestion API and can be suggested to the user.
- Analytics APIs enable you to get information about the quality of your networks.
Bubbles are now available to developers to help surface conversations across the system. Bubbles was an experimental feature in Android 10 that was enabled through a developer option -- in Android 11 this is no longer necessary.
There are a number of improvements to bubble performance, and users now have more flexibility in enabling and disabling bubbles from each app. For developers who implemented experimental support, there are a few changes to the APIs in Android 11:
- You can now create
BubbleMetadatafrom a shortcut ID by calling
BubbleMetadata.getIntent()is now deprecated, use
BubbleMetadata.getIcon()is now deprecated, use
setIcon()are now deprecated, use