Android 13 introduces great new features and APIs for developers. The sections below help you learn about features for your apps and get started with the related APIs.
For a detailed list of new, modified, and removed APIs, read the API diff report. For details on new APIs 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 13 behavior changes for apps that target Android 13 and for all apps.
User experience
Themed app icons
Starting with Android 13, users can opt into themed app icons. With this feature, app icons in supported Android launchers are tinted to inherit the coloring of the user’s chosen wallpaper and other themes.
To support this feature, your app must provide a monochromatic app icon and
point to it from the <adaptive-icon>
element in the manifest. If a user has
enabled the Themed icons toggle on their device, the system uses the
coloring of the user’s chosen wallpaper and theme to determine the tint color,
which it then applies to the monochromatic app icon.
Specifications
Your monochromatic app icon should meet the following specifications:
- It should be in SVG format, and should not be a photo.
- We recommend that the logo fits within a 36 x 36 dp area inside a 90 x 90 dp container. If the logo needs to be larger, it can be a maximum of 60 x 60 dp.
- If the logo is three-dimensional, you can use the alpha gradient.
Most apps can reuse the vector drawable used for notifications.
The following example shows a monochromatic app icon for the Google app, with dotted lines representing the boundaries between the logo and container areas. These boundaries are presented here only for illustrative purposes and are not sized to scale.
1 Container area (90 x 90 dp).
2 Logo area (36 x 36 dp recommended, 60 x 60 dp maximum).
Implement a themed app icon
In your app's manifest, add the monochrome android:
attribute to the
<adaptive-icon>
element:
<adaptive-icon >
<background android:drawable="..." />
<foreground android:drawable="..." />
<monochrome android:drawable="@drawable/myicon" />
</adaptive-icon>
Quick Settings placement API
Quick Settings in the notification shade is a convenient way for users to change settings or take quick actions without leaving the context of an app. For apps that provide custom tiles, we’re making it easier for users to discover and add your tiles to Quick Settings. Using a new tile placement API, your app can now prompt the user to directly add your custom tile to the set of active Quick Settings tiles. A new system dialog lets the user add the tile in one step, without leaving your app, rather than having to go to Quick Settings to add the tile.
Better support for multilingual users
Android 13 introduces several features to improve app experiences for multilingual users, which the following sections describe:
Per-app language preferences
In many cases, multilingual users set their system language to one language—such as English—but they want to select other languages for specific apps, such as Dutch, Chinese, or Hindi. To help apps provide a better experience for these users, Android 13 introduces APIs that let apps set a different language at runtime to display in their user interface.
Apps that use custom in-app language pickers can use the new APIs to reduce the amount of boilerplate code that's required to display an in-app language picker. To support previous versions of the Android platform, we'll be adding similar APIs in upcoming versions of our Jetpack libraries.
Apps that do not support multiple languages are not impacted by these changes.
See the page on Per-app language preferences for more details.
Unicode library updates
Android 13 adds the latest improvements, fixes, and changes that are included in Unicode ICU 70, Unicode CLDR 40, and Unicode 14.0.
Here are a couple notable changes:
- English (Canada)
en‑CA
and English (Republic of the Philippines)en‑PH
both use English (United States)en
translation resources when there are no translation resources available instead of English (United Kingdom)en‑GB
. - The
many
plural category has been introduced for Spanishes
, Italianit
, Portuguesept
, and Portuguese (Portugal)pt‑PT
. Similar to French introduced in CLDR v38, this is used for large numbers.
Faster hyphenation
Hyphenation makes wrapped text easier to read and helps make your UI more
adaptive. In Android 13, we’ve optimized hyphenation performance by as much as
200% so you can now enable it in your TextView
with almost no impact on
rendering performance. To enable faster hyphenation, use the new fullFast
or normalFast
frequencies in setHyphenationFrequency()
.
Privacy and security
Photo picker
Android 13 includes a new photo picker experience. When your app launches the photo picker, users select specific images and videos to share with your app, such as profile pictures, instead of giving your app access to view the entire media library.
The photo picker provides enhanced privacy for users because your app doesn’t need to declare any runtime permissions. In addition, the photo picker provides a built-in, standardized UI for apps, which creates a more consistent user experience.
New runtime permission for nearby Wi-Fi devices
Android 13 introduces a new
runtime permission in the
NEARBY_DEVICES
permission group for apps that manage a device's connections to
nearby access points over Wi-Fi. These apps must declare the new permission,
NEARBY_WIFI_DEVICES
,
when they
call several different Wi-Fi APIs.
In addition, as long as apps don't derive physical location from the Wi-Fi
APIs, they don't need to declare the
ACCESS_FINE_LOCATION
permission when they target Android 13 or higher.
Learn more about the nearby Wi-Fi devices permission.
Graphics
Programmable shaders
Android 13 adds support for programmable RuntimeShader
objects, with behavior
defined using the Android Graphics Shading Language (AGSL). AGSL shares much of
its syntax with GLSL, but works within the Android rendering engine to customize
painting within Android's canvas as well as filtering of View content. Android
internally uses these shaders to implement
ripple effects,
blur,
and stretch overscroll,
and Android 13 enables you to create similar advanced effects for your app.
Core functionality
OpenJDK 11 updates
Android 13 starts the work of refreshing Android's core libraries to align with the OpenJDK 11 LTS release with both library updates and Java 11 language support for application and platform developers. The core library changes introduced in Android 13 will also be available to Android 12 devices through a Google Play system update to the ART Mainline Module.
Android 13 includes the following changes to core libraries:
- Support for the
var
keyword for local variables and as parameters lambdas. New methods in the String class:
isBlank()
lines()
repeat()
strip()
stripLeading()
stripTrailing()
Support for
Collection.toArray(IntFunction)
to make it easier to adapt a collection to an array.Support for
ifPresentOrElse()
,isEmpty()
,orElseThrow()
, andstream()
injava.util
classesOptional
,OptionalDouble
,OptionalInt
, andOptionalLong
.Extended support for
SocketOptions
including re-use of sockets.NullReader
,NullWriter
,InputStream
,OutputStream
, andtransferTo()
Reader
functionality which transfer read characters to aWriter
.Added functionality for URL encoding and decoding using
Charsets
.Charset
functionality forFileReader
,FileWriter
,PrintStream
, andPrintWriter
.New
transferTo()
,readNBytes()
,readAllBytes()
, andwriteBytes()
functions forByteArrayInput
orOutputStream
andInput
orOutputStream
.Runtime and compiler support for
java.lang.invoke.VarHandle
.Updates
java.util.concurrent
to OpenJDK 11 API usingVarHandle
internally.
Java and OpenJDK are trademarks or registered trademarks of Oracle and/or its affiliates.