Android 16 mang đến cho nhà phát triển các tính năng và API mới tuyệt vời. Các phần sau đây tóm tắt những tính năng này để giúp bạn làm quen với các API liên quan.
Để biết danh sách chi tiết về các API mới, đã được sửa đổi, cũng như đã bị xoá, hãy đọc báo cáo điểm khác biệt về API. Để biết thông tin chi tiết về các API mới, hãy truy cập vào tài liệu tham khảo về API cho Android (các API mới được trình bày nổi bật).Bạn cũng nên xem xét những khía cạnh mà các thay đổi của nền tảng có thể ảnh hưởng đến ứng dụng của bạn. Để biết thêm thông tin, hãy xem các trang sau:
- Các thay đổi về hành vi ảnh hưởng đến ứng dụng khi ứng dụng nhắm đến Android 16
- Các thay đổi về hành vi ảnh hưởng đến tất cả ứng dụng bất kể
targetSdkVersion
.
Chức năng cốt lõi
Android có các API mới giúp mở rộng các chức năng cốt lõi của hệ thống Android.
Hai bản phát hành API Android vào năm 2025
- This preview is for the next major release of Android with a planned launch in Q2 of 2025. This release is similar to all of our API releases in the past, where we can have planned behavior changes that are often tied to a targetSdkVersion.
- We're planning the major release a quarter earlier (Q2 rather than Q3 in prior years) to better align with the schedule of device launches across our ecosystem, so more devices can get the major release of Android sooner. With the major release coming in Q2, you'll need to do your annual compatibility testing a few months earlier than in previous years to make sure your apps are ready.
- We plan to have another release in Q4 of 2025 which also will include new developer APIs. The Q2 major release will be the only release in 2025 to include planned behavior changes that could affect apps.
In addition to new developer APIs, the Q4 minor release will pick up feature updates, optimizations, and bug fixes; it will not include any app-impacting behavior changes.

We'll continue to have quarterly Android releases. The Q1 and Q3 updates in-between the API releases will provide incremental updates to help ensure continuous quality. We're actively working with our device partners to bring the Q2 release to as many devices as possible.
Using new APIs with major and minor releases
Guarding a code block with a check for API level is done today using
the SDK_INT
constant with
VERSION_CODES
. This will continue
to be supported for major Android releases.
if (SDK_INT >= VERSION_CODES.BAKLAVA) {
// Use APIs introduced in Android 16
}
The new SDK_INT_FULL
constant can be used for API checks against both major and minor versions with
the new VERSION_CODES_FULL
enumeration.
if (SDK_INT_FULL >= VERSION_CODES_FULL.[MAJOR or MINOR RELEASE]) {
// Use APIs introduced in a major or minor release
}
You can also use the
Build.getMinorSdkVersion()
method to get just the minor SDK version.
val minorSdkVersion = Build.getMinorSdkVersion(VERSION_CODES_FULL.BAKLAVA)
These APIs have not yet been finalized and are subject to change, so please send us feedback if you have any concerns.
Trải nghiệm người dùng và giao diện người dùng hệ thống
Android 16 mang đến cho nhà phát triển ứng dụng và người dùng nhiều quyền kiểm soát và tính linh hoạt hơn khi định cấu hình thiết bị cho phù hợp với nhu cầu của họ.
Thông báo tập trung vào tiến trình
Android 16 ra mắt thông báo tập trung vào tiến trình để giúp người dùng theo dõi liền mạch hành trình từ đầu đến cuối do người dùng khởi tạo.
Notification.ProgressStyle
là một kiểu thông báo mới cho phép bạn tạo thông báo tập trung vào tiến trình. Các trường hợp sử dụng chính bao gồm đi chung xe, giao hàng và chỉ đường. Trong lớp Notification.ProgressStyle
, bạn có thể biểu thị các trạng thái và mốc quan trọng trong hành trình của người dùng bằng cách sử dụng điểm và phân đoạn.
To learn more, see the Progress-centric notifications documentation page.


Thông tin cập nhật về tính năng xem trước thao tác quay lại
Android 16 adds new APIs to help you enable predictive back system animations in
gesture navigation such as the back-to-home animation. Registering the
onBackInvokedCallback
with the new
PRIORITY_SYSTEM_NAVIGATION_OBSERVER
allows your app to
receive the regular onBackInvoked
call whenever the
system handles a back navigation without impacting the normal back navigation
flow.
Android 16 additionally adds the
finishAndRemoveTaskCallback()
and
moveTaskToBackCallback
. By registering these callbacks
with the OnBackInvokedDispatcher
, the system can trigger
specific behaviors and play corresponding ahead-of-time animations when the back
gesture is invoked.
Phản hồi xúc giác phong phú hơn
Android has exposed control over the haptic actuator ever since its inception.
Android 11 added support for more complex haptic effects that more advanced
actuators could support through
VibrationEffect.Compositions
of device-defined semantic
primitives.
Android 16 adds haptic APIs that let apps define the amplitude and frequency curves of a haptic effect while abstracting away differences between device capabilities.
Năng suất và công cụ dành cho nhà phát triển
Mặc dù hầu hết công việc của chúng tôi nhằm cải thiện hiệu suất của bạn đều tập trung vào các công cụ như Android Studio, Jetpack Compose và các thư viện Android Jetpack, nhưng chúng tôi luôn tìm cách giúp bạn hiện thực hoá tầm nhìn của mình trên nền tảng này.
Xử lý nội dung cho hình nền động
在 Android 16 中,动态壁纸框架将获得一个新的 content API,以应对由用户驱动的动态壁纸带来的挑战。目前,包含用户提供的内容的实时壁纸需要复杂的服务专用实现。Android 16 引入了 WallpaperDescription
和 WallpaperInstance
。借助 WallpaperDescription,您可以识别同一服务中的动态壁纸的不同实例。例如,如果某张壁纸同时在主屏幕和锁定屏幕上显示,则这两种情况下显示的内容可能各不相同。壁纸选择器和 WallpaperManager
会使用此元数据更好地向用户呈现壁纸,从而简化创建多样化个性化动态壁纸体验的过程。
Hiệu suất và pin
Android 16 giới thiệu các API giúp thu thập thông tin chi tiết về ứng dụng của bạn.
Lập hồ sơ do hệ thống kích hoạt
ProfilingManager
was
added in Android 15, giving apps the ability to
request profiling data collection using Perfetto on public devices in the field.
However, since this profiling must be started from the app, critical flows such
as startups or ANRs would be difficult or impossible for apps to capture.
To help with this, Android 16 introduces system-triggered profiling to
ProfilingManager
. Apps can register interest in receiving traces for certain
triggers such as cold start reportFullyDrawn
or ANRs, and then the system starts and stops a trace on the app's behalf. After
the trace completes, the results are delivered to the app's data directory.
Thành phần khởi động trong ApplicationStartInfo
ApplicationStartInfo
在 Android 15 中添加,可让应用查看进程启动原因、启动类型、启动时间、节流和其他实用诊断数据。Android 16 添加了 getStartComponent()
,用于区分触发启动的组件类型,这有助于优化应用的启动流程。
Khả năng tự xem xét công việc hiệu quả hơn
JobScheduler#getPendingJobReason()
API 会返回作业可能处于待处理状态的原因。不过,作业处于待处理状态的原因可能有多种。
在 Android 16 中,我们引入了一个新 API JobScheduler#getPendingJobReasons(int jobId)
,该 API 会返回作业处于待处理状态的多种原因,包括开发者设置的显式约束条件和系统设置的隐式约束条件。
我们还引入了 JobScheduler#getPendingJobReasonsHistory(int jobId)
,用于返回最新约束条件更改的列表。
我们建议您使用该 API 来调试作业可能无法执行的原因,尤其是在您发现某些任务的成功率降低或某些作业完成延迟存在 bug 时。例如,未能在后台更新微件,或在应用启动之前未能调用预加载作业。
这还有助于您更好地了解某些作业是否因系统定义的约束条件而无法完成,而不是因明确设置的约束条件而无法完成。
Tốc độ làm mới thích ứng
Adaptive refresh rate (ARR), introduced in Android 15, enables the display refresh rate on supported hardware to adapt to the content frame rate using discrete VSync steps. This reduces power consumption while eliminating the need for potentially jank-inducing mode-switching.
Android 16 introduces hasArrSupport()
and
getSuggestedFrameRate(int)
while restoring
getSupportedRefreshRates()
to make it easier for your apps to take
advantage of ARR. RecyclerView
1.4 internally supports ARR when it is settling from a fling or
smooth scroll, and we're continuing our work to add ARR
support into more Jetpack libraries. This frame rate article covers
many of the APIs you can use to set the frame rate so that your app can directly
use ARR.
Headroom API trong ADPF
SystemHealthManager
giới thiệu các API getCpuHeadroom
và getGpuHeadroom
, được thiết kế để cung cấp cho các trò chơi và ứng dụng nặng về tài nguyên thông tin ước tính về tài nguyên CPU và GPU có sẵn. Các phương thức này giúp bạn đánh giá cách ứng dụng hoặc trò chơi của mình có thể cải thiện hiệu quả nhất trạng thái của hệ thống, đặc biệt là khi được sử dụng kết hợp với các API Khung hiệu suất động Android (ADPF) khác phát hiện tình trạng điều tiết nhiệt.
Bằng cách sử dụng CpuHeadroomParams
và GpuHeadroomParams
trên các thiết bị được hỗ trợ, bạn có thể tuỳ chỉnh khoảng thời gian dùng để tính toán khoảng đầu vào và chọn giữa mức sử dụng tài nguyên trung bình hoặc tối thiểu. Điều này có thể giúp bạn giảm mức sử dụng tài nguyên CPU hoặc GPU cho phù hợp, mang lại trải nghiệm người dùng tốt hơn và cải thiện thời lượng pin.
Hỗ trợ tiếp cận
Android 16 bổ sung các API và tính năng hỗ trợ tiếp cận mới có thể giúp bạn đưa ứng dụng của mình đến với mọi người dùng.
Cải thiện API hỗ trợ tiếp cận
Android 16 添加了其他 API 来增强界面语义,这有助于为依赖于无障碍服务(例如 TalkBack)的用户提高一致性。
为文字添加轮廓,以最大限度地提高文字对比度
视力较低的用户对对比度的敏感度通常较低,因此很难将对象与背景区分开来。为了帮助这些用户,Android 16 引入了轮廓文本,取代了高对比度文本,后者会在文本周围绘制较大的对比度区域,以大大提高可辨性。
Android 16 包含新的 AccessibilityManager
API,可让您的应用检查或注册监听器,以查看此模式是否已启用。这主要适用于 Compose 等界面工具包,以提供类似的视觉体验。如果您维护界面工具包库,或者您的应用执行绕过 android.text.Layout
类的自定义文本渲染,则可以使用此方法来了解何时启用轮廓文本。

向 TtsSpan 添加了时长
Android 16 使用 TYPE_DURATION
扩展了 TtsSpan
,其中包含 ARG_HOURS
、ARG_MINUTES
和 ARG_SECONDS
。这样,您就可以直接为时长添加注释,确保通过 TalkBack 等服务获得准确且一致的文本转语音输出。
支持具有多个标签的元素
Android 目前允许界面元素从其他元素派生其无障碍功能标签,现在还支持关联多个标签,这是 Web 内容中常见的情况。通过在 AccessibilityNodeInfo
中引入基于列表的 API,Android 可以直接支持这些多标签关系。在进行这项更改的过程中,我们已弃用 AccessibilityNodeInfo#setLabeledBy
和 #getLabeledBy
,改用 #addLabeledBy
、#removeLabeledBy
和 #getLabeledByList
。
改进了对可展开元素的支持
Android 16 添加了无障碍功能 API,可让您传达互动元素(例如菜单和展开式列表)的展开或收起状态。通过使用 setExpandedState
设置展开状态,并使用 CONTENT_CHANGE_TYPE_EXPANDED
内容更改类型调度 TYPE_WINDOW_CONTENT_CHANGED AccessibilityEvents,您可以确保 TalkBack 等屏幕阅读器会读出状态更改,从而提供更直观、更包容的用户体验。
不确定进度条
Android 16 添加了 RANGE_TYPE_INDETERMINATE
,让您可以为确定性和不确定性 ProgressBar
微件公开 RangeInfo
,从而让 TalkBack 等服务能够更一致地为进度指示器提供反馈。
三态复选框
Android 16 中的新 AccessibilityNodeInfo
getChecked
和 setChecked(int)
方法现在除了“已选中”和“未选中”之外,还支持“部分选中”状态。此字段取代了已废弃的布尔值 isChecked
和 setChecked(boolean)
。
补充说明
如果无障碍服务提供关于 ViewGroup
的说明,则会将来自其子视图的内容标签合并在一起。如果您为 ViewGroup
提供 contentDescription
,无障碍服务会假定您还要覆盖不可聚焦的子视图的说明。如果您想为下拉菜单等内容添加标签(例如“字体系列”),同时保留当前的无障碍功能选择(例如“Roboto”),这可能会造成问题。Android 16 添加了 setSupplementalDescription
,以便您提供用于提供 ViewGroup
相关信息的文本,而不会覆盖其子项中的信息。
必填表单字段
Android 16 向 AccessibilityNodeInfo
添加了 setFieldRequired
,以便应用可以告知无障碍服务需要输入表单字段。对于填写各种类型表单的用户而言,这是一个重要的场景,即使是简单的必填条款及条件复选框,也能帮助用户始终如一地识别必填字段并在必填字段之间快速导航。
Điện thoại làm nguồn đầu vào micrô cho cuộc gọi thoại bằng thiết bị trợ thính LEA
Android 16 新增了一项功能,让 LE Audio 助听器用户能够在助听器的内置麦克风和手机上的麦克风之间切换,以进行语音通话。在嘈杂的环境或助听器麦克风可能无法正常工作的其他情况下,这会很有帮助。
Các nút điều chỉnh âm lượng môi trường xung quanh cho thiết bị trợ thính LEA
Android 16 adds the capability for users of LE Audio hearing aids to adjust the volume of ambient sound that is picked up by the hearing aid's microphones. This can be helpful in situations where background noise is too loud or too quiet.
Camera
Android 16 tăng cường hỗ trợ cho người dùng camera chuyên nghiệp, cho phép tự động phơi sáng kết hợp cùng với chế độ điều chỉnh nhiệt độ màu và sắc thái chính xác. Chỉ báo chế độ ban đêm mới giúp ứng dụng của bạn biết thời điểm chuyển đổi sang và từ phiên máy ảnh ở chế độ ban đêm. Các thao tác Intent
mới giúp bạn dễ dàng chụp ảnh động hơn, đồng thời chúng tôi sẽ tiếp tục cải thiện hình ảnh UltraHDR bằng cách hỗ trợ mã hoá HEIC và các thông số mới theo tiêu chuẩn dự thảo ISO 21496-1.
Chế độ tự động phơi sáng kết hợp
Android 16 向 Camera2 添加了新的混合自动曝光模式,让您可以手动控制曝光的特定方面,同时让自动曝光 (AE) 算法处理其余部分。您可以控制 ISO + AE 和曝光时间 + AE,与当前方法(您要么完全手动控制,要么完全依赖自动曝光)相比,可提供更大的灵活性。
fun setISOPriority() {
// ... (Your existing code before the snippet) ...
val availablePriorityModes = mStaticInfo.characteristics.get(
CameraCharacteristics.CONTROL_AE_AVAILABLE_PRIORITY_MODES
)
// ... (Your existing code between the snippets) ...
// Turn on AE mode to set priority mode
reqBuilder.set(
CaptureRequest.CONTROL_AE_MODE,
CameraMetadata.CONTROL_AE_MODE_ON
)
reqBuilder.set(
CaptureRequest.CONTROL_AE_PRIORITY_MODE,
CameraMetadata.CONTROL_AE_PRIORITY_MODE_SENSOR_SENSITIVITY_PRIORITY
)
reqBuilder.set(
CaptureRequest.SENSOR_SENSITIVITY,
TEST_SENSITIVITY_VALUE
)
val request: CaptureRequest = reqBuilder.build()
// ... (Your existing code after the snippet) ...
}
Điều chỉnh chính xác nhiệt độ màu và sắc độ
Android 16 adds camera support for fine color temperature and tint adjustments
to better support professional video recording applications. In previous Android
versions, you could control white balance settings through
CONTROL_AWB_MODE
, which contains options limited to a
preset list, such as Incandescent,
Cloudy, and Twilight. The
COLOR_CORRECTION_MODE_CCT
enables the use of
COLOR_CORRECTION_COLOR_TEMPERATURE
and
COLOR_CORRECTION_COLOR_TINT
for precise adjustments of
white balance based on the correlated color temperature.
fun setCCT() {
// ... (Your existing code before this point) ...
val colorTemperatureRange: Range<Int> =
mStaticInfo.characteristics[CameraCharacteristics.COLOR_CORRECTION_COLOR_TEMPERATURE_RANGE]
// Set to manual mode to enable CCT mode
reqBuilder[CaptureRequest.CONTROL_AWB_MODE] = CameraMetadata.CONTROL_AWB_MODE_OFF
reqBuilder[CaptureRequest.COLOR_CORRECTION_MODE] = CameraMetadata.COLOR_CORRECTION_MODE_CCT
reqBuilder[CaptureRequest.COLOR_CORRECTION_COLOR_TEMPERATURE] = 5000
reqBuilder[CaptureRequest.COLOR_CORRECTION_COLOR_TINT] = 30
val request: CaptureRequest = reqBuilder.build()
// ... (Your existing code after this point) ...
}
The following examples show how a photo would look after applying different color temperature and tint adjustments:





Tính năng phát hiện cảnh ở chế độ ban đêm của camera
为了帮助应用了解何时切换到夜间模式相机会话以及何时从夜间模式相机会话切换出,Android 16 添加了 EXTENSION_NIGHT_MODE_INDICATOR
。如果受支持,则可在 Camera2 内的 CaptureResult
中使用。
这是我们在Instagram 如何让用户拍出令人惊艳的低光照片博文中提到的即将推出的 API。该博文提供了有关如何实现夜间模式的实用指南,并附有一份案例研究,该案例研究将应用内夜间模式照片质量的提升与通过应用内相机分享的照片数量的增加联系起来。
Thao tác theo ý định chụp ảnh chuyển động
Android 16 adds standard Intent actions —
ACTION_MOTION_PHOTO_CAPTURE
, and
ACTION_MOTION_PHOTO_CAPTURE_SECURE
— which request that
the camera application capture a motion photo and return
it.
You must either pass an extra EXTRA_OUTPUT
to control
where the image will be written, or a Uri
through
Intent.setClipData(ClipData)
. If you don't set a
ClipData
, it will be copied there for you when calling
Context.startActivity(Intent)
.
Các tính năng nâng cao hình ảnh Ultra HDR

Android 16 continues our work to deliver dazzling image quality with UltraHDR
images. It adds support for UltraHDR images in the HEIC file
format. These images will get ImageFormat
type
HEIC_ULTRAHDR
and will contain an embedded gainmap similar
to the existing UltraHDR JPEG format. We're working on AVIF support for UltraHDR
as well, so stay tuned.
In addition, Android 16 implements additional parameters in UltraHDR from the ISO 21496-1 draft standard, including the ability to get and set the colorspace that gainmap math should be applied in, as well as support for HDR encoded base images with SDR gainmaps.
Đồ hoạ
Android 16 có các điểm cải thiện mới nhất về đồ hoạ, chẳng hạn như hiệu ứng đồ hoạ tuỳ chỉnh bằng AGSL.
Hiệu ứng đồ hoạ tuỳ chỉnh bằng AGSL
Android 16 adds RuntimeColorFilter
and
RuntimeXfermode
, allowing you to author complex effects like
Threshold, Sepia, and Hue Saturation and apply them to draw calls. Since Android
13, you've been able to use AGSL to create custom
RuntimeShaders that extend Shader
. The new API
mirrors this, adding an AGSL-powered RuntimeColorFilter
that
extends ColorFilter
, and a Xfermode
effect that
lets you implement AGSL-based custom compositing and blending between source and
destination pixels.
private val thresholdEffectString = """
uniform half threshold;
half4 main(half4 c) {
half luminosity = dot(c.rgb, half3(0.2126, 0.7152, 0.0722));
half bw = step(threshold, luminosity);
return bw.xxx1 * c.a;
}"""
fun setCustomColorFilter(paint: Paint) {
val filter = RuntimeColorFilter(thresholdEffectString)
filter.setFloatUniform(0.5);
paint.colorFilter = filter
}
Khả năng kết nối
Android 16 cập nhật nền tảng để cho phép ứng dụng của bạn sử dụng những tiến bộ mới nhất về công nghệ truyền thông và không dây.
Đo khoảng cách với tính năng bảo mật nâng cao
Android 16 在搭载 Wi-Fi 6 的 802.11az 的受支持设备上为 Wi-Fi 位置信息添加了对强大的安全功能的支持,让应用能够将该协议的更高精确性、更高可伸缩性和动态调度与安全增强功能(包括基于 AES-256 的加密和防范中间人攻击)相结合。这样,在近距离使用情形(例如解锁笔记本电脑或车门)时,便可更安全地使用该功能。802.11az 与 Wi-Fi 6 标准集成,可利用其基础架构和功能实现更广泛的采用和更轻松的部署。
API đo khoảng cách chung
Android 16 includes the new RangingManager
, which provides
ways to determine the distance and angle on supported hardware between the local
device and a remote device. RangingManager
supports the usage of a variety of
ranging technologies such as BLE channel sounding, BLE RSSI-based ranging, Ultra
Wideband, and Wi-Fi round trip time.
Sự hiện diện của thiết bị trong trình quản lý thiết bị đồng hành
Android 16 中引入了用于绑定配套应用服务的新 API。当 BLE 在范围内且蓝牙处于连接状态时,系统会绑定服务;当 BLE 不在范围内或蓝牙处于断开连接状态时,系统会解除绑定服务。应用将根据各种 DevicePresenceEvent
收到新的 'onDevicePresenceEvent()' 回调。如需了解详情,请参阅 'startObservingDevicePresence(ObservingDevicePresenceRequest)'。
Nội dung nghe nhìn
Android 16 có nhiều tính năng giúp cải thiện trải nghiệm nghe nhìn.
Cải tiến công cụ chọn ảnh
照片选择器为用户提供了一种安全的内置授权方式,让用户可以向应用授予对本地存储空间和云端存储空间中所选图片和视频的访问权限,而不是对整个媒体库的访问权限。通过 Google 系统更新和 Google Play 服务组合使用模块化系统组件,该工具向后支持到 Android 4.4(API 级别 19)。只需几行代码即可与相关的 Android Jetpack 库集成。
Android 16 对照片选择器进行了以下改进:
- 嵌入式照片选择器:新 API,可让应用将照片选择器嵌入其视图层次结构中。这样,它就感觉像是应用中更为集成的一部分,同时仍可利用进程隔离功能,让用户能够选择媒体,而无需应用拥有过于宽泛的权限。为了最大限度地提高跨平台版本的兼容性并简化集成,如果您想集成嵌入式照片选择器,则需要使用即将推出的 Android Jetpack 库。
- 照片选择器中的云搜索:新的 API 可让 Android 照片选择器从云端媒体提供商中进行搜索。照片选择器中的搜索功能即将推出。
Video chuyên nghiệp nâng cao
Android 16 引入了对高级专业视频 (APV) 编解码器的支持,该编解码器专为专业级高品质视频录制和后期制作而设计。
APV 编解码器标准具有以下特点:
- 感知上无损的视频画质(接近原始视频画质)
- 复杂度低且吞吐量高的仅帧内编码(无像素域预测),以更好地支持编辑工作流
- 支持高比特率范围(最高几十 Gbps),适用于 2K、4K 和 8K 分辨率内容,由轻量级熵编码方案实现
- 帧平铺,用于沉浸式内容和启用并行编码和解码
- 支持各种色度采样格式和位深
- 支持多次解码和重新编码,且不会严重降低视觉质量
- 支持多视图视频和辅助视频,例如深度、Alpha 和预览
- 支持 HDR10/10+ 和用户定义的元数据
OpenAPV 项目提供了 APV 的参考实现。Android 16 将实现对 APV 422-10 配置文件的支持,该配置文件提供 YUV 422 色彩采样以及 10 位编码,并且目标比特率最高可达 2 Gbps。
Quyền riêng tư
Android 16 có nhiều tính năng giúp nhà phát triển ứng dụng bảo vệ quyền riêng tư của người dùng.
Thông tin cập nhật về Health Connect
Health Connect 添加了 ACTIVITY_INTENSITY
,这是一种根据世界卫生组织关于中等强度和剧烈强度活动的指南定义的数据类型。每个记录都需要提供开始时间、结束时间以及活动强度(中等或剧烈)。
Health Connect 还包含支持医疗记录的更新版 API。这样一来,应用便可在征得用户明确同意的情况下,读取和写入 FHIR 格式的医疗记录。
Hộp cát về quyền riêng tư trên Android
Android 16 中集成了最新版本的 Privacy Sandbox on Android,这是我们持续致力于开发可让用户放心地知道其隐私受到保护的技术的一部分。您可以访问我们的网站,详细了解 Privacy Sandbox on Android 开发者 Beta 版计划,以便顺利上手。不妨了解 SDK 运行时,它可让 SDK 在与其所服务的应用分离的专用运行时环境中运行,从而为用户数据收集和共享提供更强的保护措施。
Bảo mật
Android 16 có các tính năng giúp bạn tăng cường tính bảo mật cho ứng dụng và bảo vệ dữ liệu của ứng dụng.
API chia sẻ khoá
Android 16 adds APIs that support sharing access to
Android Keystore keys with other apps. The new
KeyStoreManager
class supports
granting and revoking access to keys
by app uid, and includes an API for apps to access shared
keys.
Kiểu dáng thiết bị
Android 16 hỗ trợ các ứng dụng của bạn khai thác tối đa các kiểu dáng của Android.
Khung hình ảnh và âm thanh chất lượng tiêu chuẩn cho TV
The new MediaQuality
package in Android 16 exposes
a set of standardized APIs for access to audio and picture profiles and
hardware-related settings. This allows streaming apps to query profiles and
apply them to media dynamically:
- Movies mastered with a wider dynamic range require greater color accuracy to see subtle details in shadows and adjust to ambient light, so a profile that prefers color accuracy over brightness may be appropriate.
- Live sporting events are often mastered with a narrow dynamic range, but are often watched in daylight, so a profile that preferences brightness over color accuracy can give better results.
- Fully interactive content wants minimal processing to reduce latency, and wants higher frame rates, which is why many TV's ship with a game profile.
The API allows apps to switch between profiles and users to enjoy tuning supported TVs to best suit their content.
Quốc tế hoá
Android 16 bổ sung các tính năng và chức năng bổ trợ cho trải nghiệm người dùng khi thiết bị được dùng bằng nhiều ngôn ngữ.
Văn bản dọc
Android 16 adds low-level support for rendering and measuring text vertically to
provide foundational vertical writing support for library developers. This is
particularly useful for languages like Japanese that commonly use vertical
writing systems. A new flag,
VERTICAL_TEXT_FLAG
,
has been added to the Paint
class. When
this flag is set using
Paint.setFlags
, Paint's
text measurement APIs will report vertical advances instead of horizontal
advances, and Canvas
will draw text
vertically.
val text = "「春は、曙。」"
Box(
Modifier.padding(innerPadding).background(Color.White).fillMaxSize().drawWithContent {
drawIntoCanvas { canvas ->
val paint = Paint().apply { textSize = 64.sp.toPx() }
// Draw text vertically
paint.flags = paint.flags or VERTICAL_TEXT_FLAG
val height = paint.measureText(text)
canvas.nativeCanvas.drawText(
text,
0,
text.length,
size.width / 2,
(size.height - height) / 2,
paint
)
}
}
) {}
Tuỳ chỉnh hệ thống đo lường
Users can now customize their measurement system in regional preferences within
Settings. The user preference is included as part of the locale code, so you can
register a BroadcastReceiver
on
ACTION_LOCALE_CHANGED
to handle locale configuration changes when
regional preferences change.
Using formatters can help match the local experience. For example, "0.5 in" in English (United States), is "12,7 mm" for a user who has set their phone to English (Denmark) or who uses their phone in English (United States) with the metric system as the measurement system preference.
To find these settings, open the Settings app and navigate to System > Languages & region.