Características y API

Android 16 incluye excelentes funciones y APIs para desarrolladores. En las siguientes secciones, se resumen estas funciones para ayudarte a comenzar a usar las APIs relacionadas.

Para obtener una lista detallada de las APIs nuevas, modificadas y quitadas, consulta el informe de diferencias de la API. Para obtener detalles sobre las nuevas APIs, consulta la referencia de la API de Android. Las nuevas APIs están destacadas para que sea más fácil identificarlas.

También debes revisar las áreas en las que los cambios en la plataforma podrían afectar tus apps. Para obtener más información, consulta las siguientes páginas:

Funcionalidad principal

Android incluye nuevas APIs que expanden las capacidades principales del sistema Android.

Dos versiones de la API de Android en 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.

Timeline view of Android releases in 2025, noting that the 25Q2
       release is a major release and the 25Q4 release is a minor release.

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.

Experiencia del usuario y la IU del sistema

Android 16 brinda a los desarrolladores de apps y a los usuarios más control y flexibilidad para configurar sus dispositivos según sus necesidades.

Notificaciones centradas en el progreso

Android 16 引入了以进度为中心的通知,可帮助用户顺畅地跟踪用户发起的端到端历程。

Notification.ProgressStyle 是一种新的通知样式,可让您创建以进度为中心的通知。主要用例包括共享车辆、送货和导航。在 Notification.ProgressStyle 类中,您可以使用细分来表示用户体验历程中的状态和里程碑。

如需了解详情,请参阅以进度为中心的通知文档页面。

A progress-centric notification displayed on the lockscreen.
A progress-centric notification displayed in the notification shade.

Actualizaciones de atrás predictivo

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.

Tecnología táctil más enriquecida

Android expuso el control sobre el actuador táctil desde su creación.

Android 11 agregó compatibilidad con efectos táctiles más complejos que los actuadores más avanzados podrían admitir a través de VibrationEffect.Compositions de primitivas semánticas definidas por el dispositivo.

Android 16 agrega APIs táctiles que permiten que las apps definan las curvas de amplitud y frecuencia de un efecto táctil y, al mismo tiempo, abstraigan las diferencias entre las capacidades del dispositivo.

Productividad y herramientas para desarrolladores

Si bien la mayor parte de nuestro trabajo para mejorar tu productividad se centra en herramientas como Android Studio, Jetpack Compose y las bibliotecas de Android Jetpack, siempre buscamos formas en la plataforma para ayudarte a concretar tu visión.

Control de contenido para fondos animados

En Android 16, el framework de fondos de pantalla animados obtiene una nueva API de contenido para abordar los desafíos de los fondos de pantalla dinámicos controlados por el usuario. Actualmente, los fondos de pantalla en vivo que incorporan contenido proporcionado por el usuario requieren implementaciones complejas y específicas del servicio. Android 16 presenta WallpaperDescription y WallpaperInstance. WallpaperDescription te permite identificar instancias distintas de un fondo animado del mismo servicio. Por ejemplo, un fondo de pantalla que tiene instancias en la pantalla principal y en la pantalla de bloqueo puede tener contenido único en ambos lugares. El selector de fondo de pantalla y WallpaperManager usan estos metadatos para presentar mejor los fondos de pantalla a los usuarios, lo que optimiza el proceso para que crees experiencias de fondo de pantalla en vivo diversas y personalizadas.

Rendimiento y batería

Android 16 introduce APIs que ayudan a recopilar estadísticas sobre tus apps.

Generación de perfiles activada por el sistema

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.

Componente de inicio en ApplicationStartInfo

ApplicationStartInfo 在 Android 15 中添加,可让应用查看进程启动原因、启动类型、启动时间、节流和其他实用诊断数据。Android 16 添加了 getStartComponent(),用于区分触发启动的组件类型,这有助于优化应用的启动流程。

Mejor introspección de los trabajos

La API de JobScheduler#getPendingJobReason() muestra un motivo por el que un trabajo podría estar pendiente. Sin embargo, un trabajo puede estar pendiente por varios motivos.

En Android 16, presentamos una nueva API JobScheduler#getPendingJobReasons(int jobId), que muestra varios motivos por los que una tarea está pendiente, debido a las restricciones explícitas que establece el desarrollador y las implícitas que establece el sistema.

También presentamos JobScheduler#getPendingJobReasonsHistory(int jobId), que muestra una lista de los cambios de restricción más recientes.

Te recomendamos que uses la API para depurar por qué es posible que no se ejecuten tus trabajos, sobre todo si observas tasas de éxito reducidas en ciertas tareas o tienes errores en la latencia de la finalización de ciertos trabajos. Por ejemplo, no se pudo actualizar los widgets en segundo plano o no se pudo llamar a la tarea de precarga antes de iniciar la app.

Esto también puede ayudarte a comprender mejor si ciertas tareas no se completan debido a restricciones definidas por el sistema en comparación con las restricciones establecidas de forma explícita.

Frecuencia de actualización adaptativa

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.

APIs de Headroom en ADPF

The SystemHealthManager introduces the getCpuHeadroom and getGpuHeadroom APIs, designed to provide games and resource-intensive apps with estimates of available CPU and GPU resources. These methods offer a way for you to gauge how your app or game can best improve system health, particularly when used in conjunction with other Android Dynamic Performance Framework (ADPF) APIs that detect thermal throttling.

By using CpuHeadroomParams and GpuHeadroomParams on supported devices, you can customize the time window used to compute the headroom and select between average or minimum resource availability. This can help you reduce your CPU or GPU resource usage accordingly, leading to better user experiences and improved battery life.

Accesibilidad

Android 16 agrega nuevas APIs y funciones de accesibilidad que pueden ayudarte a llevar tu app a todos los usuarios.

Se mejoraron las APIs de accesibilidad

Android 16 添加了其他 API 来增强界面语义,这有助于为依赖于无障碍服务(例如 TalkBack)的用户提高一致性。

为文字添加轮廓,以最大限度地提高文字对比度

视力较低的用户对对比度的敏感度通常较低,因此很难将对象与背景区分开来。为了帮助这些用户,Android 16 引入了轮廓文本,取代了高对比度文本,后者会在文本周围绘制较大的对比度区域,以大大提高可辨性。

Android 16 包含新的 AccessibilityManager API,可让您的应用检查注册监听器,以查看此模式是否已启用。这主要适用于 Compose 等界面工具包,以提供类似的视觉体验。如果您维护界面工具包库,或者您的应用执行绕过 android.text.Layout 类的自定义文本渲染,则可以使用此方法来了解何时启用轮廓文本。

Android 16 推出新的轮廓文本无障碍功能前后,对比度更高的文本

向 TtsSpan 添加了时长

Android 16 使用 TYPE_DURATION 扩展了 TtsSpan,其中包含 ARG_HOURSARG_MINUTESARG_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 getCheckedsetChecked(int) 方法现在除了“已选中”和“未选中”之外,还支持“部分选中”状态。此字段取代了已废弃的布尔值 isCheckedsetChecked(boolean)

补充说明

如果无障碍服务提供关于 ViewGroup 的说明,则会将来自其子视图的内容标签合并在一起。如果您为 ViewGroup 提供 contentDescription,无障碍服务会假定您还要覆盖不可聚焦的子视图的说明。如果您想为下拉菜单等内容添加标签(例如“字体系列”),同时保留当前的无障碍功能选择(例如“Roboto”),这可能会造成问题。Android 16 添加了 setSupplementalDescription,以便您提供用于提供 ViewGroup 相关信息的文本,而不会覆盖其子项中的信息。

必填表单字段

Android 16 向 AccessibilityNodeInfo 添加了 setFieldRequired,以便应用可以告知无障碍服务需要输入表单字段。对于填写各种类型表单的用户而言,这是一个重要的场景,即使是简单的必填条款及条件复选框,也能帮助用户始终如一地识别必填字段并在必填字段之间快速导航。

El teléfono como entrada de micrófono para llamadas de voz con audífonos LEA

Android 16 adds the capability for users of LE Audio hearing aids to switch between the built-in microphones on the hearing aids and the microphone on their phone for voice calls. This can be helpful in noisy environments or other situations where the hearing aid's microphones might not perform well.

Controles de volumen ambiental para audífonos LEA

Android 16 agrega la capacidad para que los usuarios de audífonos LE Audio ajusten el volumen del sonido ambiental que captan los micrófonos de los audífonos. Esto puede ser útil en situaciones en las que el ruido de fondo es demasiado alto o demasiado bajo.

Cámara

Android 16 mejora la compatibilidad para los usuarios de cámaras profesionales, lo que permite la exposición automática híbrida junto con ajustes precisos de la temperatura y el tono del color. Un nuevo indicador de modo nocturno ayuda a tu app a saber cuándo cambiar a una sesión de cámara en modo nocturno y cuándo salir de ella. Las nuevas acciones de Intent facilitan la captura de fotos en movimiento, y seguimos mejorando las imágenes en Ultra HDR con compatibilidad para la codificación HEIC y nuevos parámetros del borrador del estándar ISO 21496-1.

Exposición automática híbrida

Android 16 agrega nuevos modos de exposición automática híbridos a Camera2, lo que te permite controlar manualmente aspectos específicos de la exposición y, al mismo tiempo, permitir que el algoritmo de exposición automática (AE) controle el resto. Puedes controlar ISO + AE y tiempo de exposición + AE, lo que proporciona una mayor flexibilidad en comparación con el enfoque actual en el que tienes control manual completo o dependes por completo de la exposición automática.

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) ...
}

Ajustes precisos de temperatura y tono de color

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:

The original image with no color temperature or tint adjustments applied.
The image with color temperature adjusted to 3000.
The image with color temperature adjusted to 7000.


The image with tint levels lowered by 50.
The image with tint levels raised by 50.

Detección de escenas en el modo nocturno de la cámara

To help your app know when to switch to and from a night mode camera session, Android 16 adds EXTENSION_NIGHT_MODE_INDICATOR. If supported, it's available in the CaptureResult within Camera2.

This is the API we briefly mentioned as coming soon in the How Instagram enabled users to take stunning low light photos blog post. That post is a practical guide on how to implement night mode together with a case study that links higher-quality in-app night mode photos with an increase in the number of photos shared from the in-app camera.

Acciones de intent de captura de fotos en movimiento

Android 16 agrega acciones de intent estándar (ACTION_MOTION_PHOTO_CAPTURE y ACTION_MOTION_PHOTO_CAPTURE_SECURE) que solicitan que la aplicación de la cámara capture una foto en movimiento y la devuelva.

Debes pasar un EXTRA_OUTPUT adicional para controlar dónde se escribirá la imagen o un Uri a través de Intent.setClipData(ClipData). Si no configuras un ClipData, se copiará allí cuando llames a Context.startActivity(Intent).

Ejemplo de una foto en movimiento, que muestra la imagen fija seguida de la reproducción del movimiento.

Mejoras de imagen Ultra HDR

标准动态范围 (SDR) 与高动态范围 (HDR) 图片质量对比示意图。

Android 16 继续致力于通过 UltraHDR 图片提供出色的图片质量。它添加了对 HEIC 文件格式的 UltraHDR 图片的支持。这些图片将获得 ImageFormat 类型 HEIC_ULTRAHDR,并包含类似于现有 UltraHDR JPEG 格式的嵌入式增益图。我们还在努力为 UltraHDR 添加 AVIF 支持,敬请期待。

此外,Android 16 在 UltraHDR 中实现了 ISO 21496-1 草稿标准中的其他参数,包括能够获取和设置应应用增益图算法的色彩空间,以及支持使用 SDR 增益图的 HDR 编码基础图片。

Gráficos

Android 16 incluye las mejoras gráficas más recientes, como efectos gráficos personalizados con AGSL.

Efectos gráficos personalizados con 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
}

Conectividad

Android 16 actualiza la plataforma para que tu app tenga acceso a los avances más recientes en tecnologías inalámbricas y de comunicación.

Medición de distancia con seguridad mejorada

Android 16 agrega compatibilidad con funciones de seguridad sólidas en la ubicación Wi-Fi en dispositivos compatibles con 802.11az de Wi-Fi 6, lo que permite que las apps combinen la mayor precisión, la mayor escalabilidad y la programación dinámica del protocolo con mejoras de seguridad, como la encriptación basada en AES-256 y la protección contra ataques de intermediarios. Esto permite que se use de forma más segura en casos de uso de proximidad, como destrabar una laptop o la puerta de un vehículo. 802.11az está integrado en el estándar Wi-Fi 6, lo que aprovecha su infraestructura y sus capacidades para una adopción más amplia y una implementación más sencilla.

APIs de rango genéricas

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.

Presencia del dispositivo con el administrador de dispositivo complementario

Android 16 中引入了用于绑定配套应用服务的新 API。当 BLE 在范围内且蓝牙处于连接状态时,系统会绑定服务;当 BLE 不在范围内或蓝牙处于断开连接状态时,系统会解除绑定服务。应用将根据各种 DevicePresenceEvent 收到新的 'onDevicePresenceEvent()' 回调。如需了解详情,请参阅 'startObservingDevicePresence(ObservingDevicePresenceRequest)'

Contenido multimedia

Android 16 incluye una variedad de funciones que mejoran la experiencia multimedia.

Mejoras en el selector de fotos

The photo picker provides a safe, built-in way for users to grant your app access to selected images and videos from both local and cloud storage, instead of their entire media library. Using a combination of Modular System Components through Google System Updates and Google Play services, it's supported back to Android 4.4 (API level 19). Integration requires just a few lines of code with the associated Android Jetpack library.

Android 16 includes the following improvements to the photo picker:

  • Embedded photo picker: New APIs that enable apps to embed the photo picker into their view hierarchy. This allows it to feel like a more integrated part of the app while still leveraging the process isolation that allows users to select media without the app needing overly broad permissions. To maximize compatibility across platform versions and simplify your integration, you'll want to use the forthcoming Android Jetpack library if you want to integrate the embedded photo picker.
  • Cloud search in photo picker: New APIs that enable searching from the cloud media provider for the Android photo picker. Search functionality in the photo picker is coming soon.

Video profesional avanzado

Android 16 introduces support for the Advanced Professional Video (APV) codec which is designed to be used for professional level high quality video recording and post production.

The APV codec standard has the following features:

  • Perceptually lossless video quality (close to raw video quality)
  • Low complexity and high throughput intra-frame-only coding (without pixel domain prediction) to better support editing workflows
  • Support for high bit-rate range up to a few Gbps for 2K, 4K and 8K resolution content, enabled by a lightweight entropy coding scheme
  • Frame tiling for immersive content and for enabling parallel encoding and decoding
  • Support for various chroma sampling formats and bit-depths
  • Support for multiple decoding and re-encoding without severe visual quality degradation
  • Support multi-view video and auxiliary video like depth, alpha, and preview
  • Support for HDR10/10+ and user-defined metadata

A reference implementation of APV is provided through the OpenAPV project. Android 16 will implement support for the APV 422-10 Profile that provides YUV 422 color sampling along with 10-bit encoding and for target bitrates of up to 2Gbps.

Privacidad

Android 16 incluye una variedad de funciones que ayudan a los desarrolladores de apps a proteger la privacidad del usuario.

Actualizaciones de Health Connect

Health Connect adds ACTIVITY_INTENSITY, a data type defined according to World Health Organization guidelines around moderate and vigorous activity. Each record requires the start time, the end time, and whether the activity intensity is moderate or vigorous.

Health Connect also contains updated APIs supporting medical records. This allows apps to read and write medical records in FHIR format with explicit user consent.

Privacy Sandbox en Android

Android 16 incorpora la versión más reciente de Privacy Sandbox en Android, que forma parte de nuestro trabajo continuo para desarrollar tecnologías en las que los usuarios sepan que se protege su privacidad. En nuestro sitio web, encontrarás más información sobre el programa de versión beta para desarrolladores de Privacy Sandbox en Android para ayudarte a comenzar. Consulta el entorno de ejecución de SDK, que permite que los SDKs se ejecuten en un entorno de ejecución dedicado independiente de la app que se entrega, lo que proporciona protecciones más sólidas en torno a la recopilación y el uso compartido de los datos del usuario.

Seguridad

Android 16 incluye funciones que te ayudan a mejorar la seguridad de tu app y a proteger sus datos.

API de uso compartido de claves

Android 16 添加了一些 API,这些 API 支持与其他应用共享对 Android Keystore 密钥的访问权限。新的 KeyStoreManager 类支持按应用 uid 授予撤消对密钥的访问权限,并包含一个供应用访问共享密钥的 API。

Factores de forma del dispositivo

Android 16 brinda a tus apps la compatibilidad necesaria para aprovechar al máximo los factores de forma de Android.

Marco de trabajo estandarizado de calidad de imagen y audio para TVs

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.

Internacionalización

Android 16 agrega funciones y capacidades que complementan la experiencia del usuario cuando un dispositivo se usa en diferentes idiomas.

Texto vertical

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
            )
        }
    }
) {}

Personalización del sistema de medición

用户现在可以在“设置”中的地区偏好设置中自定义测量系统。用户偏好设置包含在语言区域代码中,因此您可以在 ACTION_LOCALE_CHANGED 上注册 BroadcastReceiver,以便在地区偏好设置发生更改时处理语言区域配置更改。

使用格式设置程序有助于提供符合当地体验的服务。例如,对于将手机设置为英语(丹麦)或将手机设置为英语(美国)并将公制作为首选测量系统的用户,“0.5 in”的英语(美国)对应于“12,7 mm”。

如需找到这些设置,请打开“设置”应用,然后依次前往系统 > 语言和地区