头图

Author / Dave Burke, VP of Engineering

Every day, billions of people around the world use Android devices to get things done. The excellent experience of these users using Android is inseparable from everyone, that is, the full support of the developer community. It is the feedback and suggestions from developers that help us build a stronger Android.

Today, we bring you the first developer preview of the next version of Android, Android 13. In Android 13, we're continuing to advance some important themes: privacy and security, and developer productivity. We'll also help you get the most out of the 250 million active large-screen Android devices, based on some of the recently released updates on the 12L.

For Android 13, this is just the beginning. We will share more with you in subsequent releases. Read on for this article and visit Android 13 developer site to learn how to download and install the system image with the , and the release schedule . As always, it's important to hear feedback from everyone early on so that we have time to reflect it into the final release. We really look forward to hearing your thoughts, and we thank you all in advance for helping us make Android a platform for everyone!

and security at the

When dealing with their most private and sensitive information, people want to use operating systems and applications they can trust. Privacy is at the heart of Android's product principles, and Android 13 focuses on providing a more secure environment on devices and giving users more control to create a responsible, high-quality platform for all. In today's developer preview, we're introducing a photo picker that lets users securely share photos and videos within apps; and a new Wi-Fi permission to further reduce apps' need for location permissions. We encourage everyone to try these new APIs and test the impact these changes might have on your app.

Photo Picker and API - To protect users' photo and video privacy, Android 13 adds a system photo picker, a standard and optimized way for users to securely share local and cloud photos. Android has traditionally used the document picker to allow users to share any type of file with an app without the app needing permission to view all media files on the device. The Photo Picker extends this capability and provides a more tailored experience for photos and videos. Apps can access photos and videos shared by users through the Photo Picker API , and do not need permission to view all media files on the device. As part of an update to the MediaProvider module in devices running Android 11 and above (excluding Go devices), we plan to bring the photo picker experience to more Android users via a Google Play system update. Welcome to experience the Photo Picker API and share your usage feedback

△ 照片选择器提供了统一、安全的方式来让用户授权应用访问照片和视频

△ Photo Picker provides a unified and secure way for users to authorize apps to access photos and videos

Nearby Device Permissions for Wi-Fi - Android 13 adds the NEARBY_WIFI_DEVICES runtime permission (belongs to the NEARBY_DEVICES permission group) for apps that manage device connections to surrounding Wi-Fi hotspots. This permission is required by many applications that call the commonly used Wi-Fi API , to discover and connect to nearby devices via Wi-Fi without requiring location permissions. Previously, the need for location permissions was a challenge for apps that only needed to connect to a Wi-Fi device, but didn't actually need to know the device's location. Apps targeting Android 13 can now apply for the NEARBY_WIFI_DEVICES permission via the "neverForLocation" attribute , which will help facilitate privacy-friendly app design while reducing friction for developers. Please visit official document for details.

Productivity and

Android 13 also brings new features and tools to boost developer productivity. Helping developers create beautiful apps that run on billions of devices is one of our core missions. Either on the Android 13 platform, or through our Modern Android Development ( Modern Android Development ) tools, such as your favorite Kotlin language or Jetpack's recommended API. We want to reduce development costs by helping you work more efficiently, so you can focus on continuing to build amazing experiences.

Here's a look at some of the new stuff in today's Developer Preview:

Quick Settings Placement API - Quick Settings in the notification bar allows users to change settings or perform quick actions without leaving the app. For apps that offer custom , we'll make your tiles easier for users to discover and add them to quick settings. With the new tile placement API ), your app can now prompt the user to add your custom tile directly to the Quick Settings tile group. A new system dialog allows users to add tiles with a single click without leaving your app, instead of going to Quick Settings to manually add tiles.

App - In Android 13, we're extending Material You dynamic colors to all app icons outside of the Google app, allowing users to choose icon tint based on their wallpaper and other theme preferences. Your app just needs to provide a monochrome app icon (like your notification Drawable) and make some tweaks to the adaptive icon XML. We encourage all developers to provide compatible icons to provide a consistent experience for users who choose to use this feature. Themed app icons will initially be supported on Pixel devices, and we're working with our device manufacturer partners to bring this feature to more devices. Please visit official document for details.

Language preference for a single app - Some apps allow the user to select a language different from the system language to cater for multilingual users. Such apps can now call a new system API, , to set or get the user's preferred language, reducing boilerplate code and improving compatibility when setting the app's runtime language. For wider compatibility, we will be adding a similar API to the upcoming Jetpack development library. Please visit official document for details.

Faster Hyphenation - Hyphenation makes wrapping text easier to read and makes your interface more adaptable. In Android 13, we've improved hyphenation performance by up to 200%, and you can now enable hyphenation in TextViews with little or no impact on rendering performance. If you want to enable faster hyphenation, you can use the new fullFast or normalFast frequency in setHyphenationFrequency() ). Everyone is welcome to experience faster hyphenation and share your thoughts with us!

Programmable shader (shader) - Android 13 adds support for the Programmable RuntimeShader object, whose behavior is defined using the Android Graphics Shading Language (AGSL). AGSL shares most of the syntax with GLSL, but works inside the Android rendering engine to customize the drawing in the Android canvas and filter the content in the View. Android uses these shaders internally for ripple , blur , and stretch effects , and Android 13 enables you to create similar advanced effects for your own apps.

△ AGSL dynamic shader rewritten from GLSL shader

OpenJDK 11 Update - In Android 13, we have started updating the Android core library to align with the OpenJDK 11 LTS release, providing codebase updates and Java 11 programming language support for app and platform developers. As part of the ART module update for devices running Android 12 and above, we plan to roll out these core library changes to more devices via Google Play system updates. Please visit official document for details.

Application Compatibility

When releasing new platform versions, we prioritize app compatibility to make the system update experience faster and smoother. In Android 13, most app-facing changes are optional to give you more time to tweak and adapt, and we've updated tools and processes to help you get ready faster.

More Android System Features via Google Play Update - In Android 13, we continue to expand our investment in Google Play System Update (Project Mainline) to make apps more consistent and secure across devices environment and deliver new features and functionality to users. We can now push new features such as the photo picker and OpenJDK 11 directly to users of older versions of Android via updates to existing modules. We've also added new modules, such as Bluetooth and Ultra Wideband, to further expand the range of core Android updatable features.

for tablets, foldables, and Chromebooks - With the proliferation of large-screen devices such as tablets, foldables, and Chromebooks, now is the time to get your apps ready for these devices and designed to fit any Fully responsive app for the screen too. You can start fitting with our tablet app quality guide, then learn how to build for the large screen and foldable .

Easier Testing and Debugging for Changes - To make it easier for you to test optional changes that may affect your application, we are still putting many of the changed switches in your hands this year. You can force these changes on or off individually in developer options or adb. Please visit official document for details.

△ 开发者选项中的应用兼容性开关

△ App compatibility switch in developer options

Platform Stability Milestones - As with last year, we will communicate our platform stability milestones in advance to give you more time to plan your app compatibility efforts. When this milestone is reached, we will not only deliver the final SDK/NDK API, but also lock down the final internal API and application-oriented system behavior. We expect to reach the platform stability milestone in June 2022, at which point you will have a few weeks for final testing before the official release. release schedule see:

started with Android 13

Whether you want to experience Android 13 features, test apps, or , you can start with this developer preview. If you want to test the compatibility of your app on tablet and foldable devices, the easiest way is to use the Android emulator's tablet or foldable device configuration, please read official document for setup instructions. For phones, simply download and flash the system image to the Pixel 6 Pro / 6 / 5a 5G / 5 / 4a (5G) / 4a / 4 XL / 4 device and you are ready to go. If you don't have a Pixel device, you can use the Android emulator with a 64-bit system image in Android Studio. For more extensive testing, we also provide GSI images.

After setting up , you can:

  • Experience the new features and API - Your feedback is crucial in the early stages of the developer preview. You can report an issue on our tracking page or go to Feedback and Requests page to provide direct feedback through a feature-specific questionnaire.
  • tests existing apps for compatibility - This is to test if your app is affected by Android 13 default behavior changes. Just install and test your currently published app on a device or emulator running Android 13.
  • your app with optional changes - Android 13 provides optional behavior changes that only affect your app targeting a new platform. It is important to understand and evaluate these changes as early as possible. For easier testing, you can or disable these changes .

We will regularly update preview system images and SDKs throughout the Android 13 release cycle. The initial preview version released this time is only for developers to use , not for daily or consumer use, so we only provide manual download of for . After you manually install a preview build, you'll automatically get subsequent preview and beta updates via OTA. Please visit official document for details:

As we get closer to the beta release, we're also inviting consumers to experience Android 13, when Android Beta registrations will open. Note, however, that Android 13 is not currently available in beta.

For complete information on this release, visit Android 13 developer site .

* Java and OpenJDK are trademarks or registered trademarks of Oracle and/or its affiliates.


Android开发者
404 声望2k 粉丝

Android 最新开发技术更新,包括 Kotlin、Android Studio、Jetpack 和 Android 最新系统技术特性分享。更多内容,请关注 官方 Android 开发者文档。