Descripción general de las funciones y API

Android 15 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 agregadas, modificadas y quitadas, consulta el informe de diferencias de API. Para obtener detalles sobre las APIs agregadas, consulta la referencia de la API de Android. En el caso de Android 15, busca las APIs que se agregaron en el nivel de API 35. Para conocer las áreas en las que los cambios de la plataforma podrían afectar tus apps, asegúrate de revisar los cambios en el comportamiento de Android 15 para apps orientadas a Android 15 y para todas las apps.

Cámara y contenido multimedia

Android 15 incluye una variedad de funciones que mejoran la experiencia de la cámara y el contenido multimedia, y te brindan acceso a herramientas y hardware para ayudar a los creadores a dar vida a su visión en Android.

Para obtener más información sobre las funciones y soluciones para desarrolladores más recientes de contenido multimedia y cámaras de Android, consulta la charla Cómo crear experiencias modernas de contenido multimedia y cámaras de Android de Google I/O.

Mejora con poca luz

Android 15 introduces Low Light Boost, an auto-exposure mode available to both Camera 2 and the night mode camera extension. Low Light Boost adjusts the exposure of the Preview stream in low-light conditions. This is different from how the night mode camera extension creates still images, because night mode combines a burst of photos to create a single, enhanced image. While night mode works very well for creating a still image, it can't create a continuous stream of frames, but Low Light Boost can. Thus, Low Light Boost enables camera capabilities, such as:

  • Providing an enhanced image preview, so users are better able to frame their low-light pictures
  • Scanning QR codes in low light

If you enable Low Light Boost, it automatically turns on when there's a low light level, and turns off when there's more light.

Apps can record off the Preview stream in low-light conditions to save a brightened video.

For more information, see Low Light Boost.

Controles de la cámara en la app

Android 15 adds an extension for more control over the camera hardware and its algorithms on supported devices:

  • Advanced flash strength adjustments enabling precise control of flash intensity in both SINGLE and TORCH modes while capturing images.

Control de margen de HDR

Android 15 会选择适合底层设备功能和面板位深的 HDR 余量。对于包含大量 SDR 内容的网页(例如显示单个 HDR 缩略图的消息应用),此行为最终可能会对 SDR 内容的感知亮度产生不利影响。在 Android 15 中,您可以使用 setDesiredHdrHeadroom 控制 HDR 余量,以便在 SDR 内容和 HDR 内容之间取得平衡。

左侧屏幕上的 SDR 界面元素的亮度似乎比右侧屏幕上的亮度更均匀,这模拟了混合 HDR 和 SDR 内容时可能出现的余量问题。通过调整 HDR 余量,您可以在 SDR 和 HDR 内容之间实现更好的平衡。

Control de volumen

Android 15 introduces support for the CTA-2075 loudness standard to help you avoid audio loudness inconsistencies and ensure users don't have to constantly adjust volume when switching between content. The system leverages known characteristics of the output devices (headphones and speaker) along with loudness metadata available in AAC audio content to intelligently adjust the audio loudness and dynamic range compression levels.

To enable this feature, you need to ensure loudness metadata is available in your AAC content and enable the platform feature in your app. For this, you instantiate a LoudnessCodecController object by calling its create factory method with the audio session ID from the associated AudioTrack; this automatically starts applying audio updates. You can pass an OnLoudnessCodecUpdateListener to modify or filter loudness parameters before they are applied on the MediaCodec.

// Media contains metadata of type MPEG_4 OR MPEG_D
val mediaCodec = 
val audioTrack = AudioTrack.Builder()
                                .setSessionId(sessionId)
                                .build()
...
// Create new loudness controller that applies the parameters to the MediaCodec
try {
   val lcController = LoudnessCodecController.create(mSessionId)
   // Starts applying audio updates for each added MediaCodec
}

AndroidX media3 ExoPlayer will also be updated to use the LoudnessCodecController APIs for a seamless app integration.

Dispositivos MIDI 2.0 virtuales

Android 13 agregó compatibilidad para conectarse a dispositivos MIDI 2.0 a través de USB, que se comunican con paquetes MIDI universales (UMP). Android 15 extiende la compatibilidad con UMP a las apps de MIDI virtual, lo que permite que las apps de composición controlen las apps de sintetizador como un dispositivo MIDI 2.0 virtual, al igual que lo harían con un dispositivo MIDI 2.0 USB.

Decodificación de software AV1 más eficiente

dav1d logo

dav1d, the popular AV1 software decoder from VideoLAN is available for Android devices that don't support AV1 decode in hardware. dav1d is up to 3x more performant than the legacy AV1 software decoder, enabling HD AV1 playback for more users, including some low and mid tier devices.

Your app needs to opt-in to using dav1d by invoking it by name "c2.android.av1-dav1d.decoder". dav1d will be made the default AV1 software decoder in a subsequent update. This support is standardized and backported to Android 11 devices that receive Google Play system updates.

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 materializar tu visión con mayor facilidad.

Actualizaciones de OpenJDK 17

Android 15 continues the work of refreshing Android's core libraries to align with the features in the latest OpenJDK LTS releases.

The following key features and improvements are included:

These APIs are updated on over a billion devices running Android 12 (API level 31) and higher through Google Play System updates, so you can target the latest programming features.

Mejoras en los archivos PDF

Android 15 incluye mejoras sustanciales en las APIs de PdfRenderer. Las apps pueden incorporar funciones avanzadas, como la renderización de archivos protegidos por contraseña, las anotaciones, la edición de formularios, la búsqueda y la selección con copia. Se admiten optimizaciones de PDF linealizados para acelerar la visualización de PDF local y reducir el uso de recursos. La biblioteca de PDF de Jetpack usa estas APIs para simplificar la adición de funciones de visualización de PDF a tu app.

Las actualizaciones más recientes del procesamiento de PDF incluyen funciones como la búsqueda en un archivo PDF incorporado.

Se trasladó PdfRenderer a un módulo que se puede actualizar con Google. Las actualizaciones del sistema de Play son independientes de la versión de la plataforma, estos cambios a Android 11 (nivel de API 30) mediante la creación de una versión versión de la plataforma de API anterior a Android 15, llamada PdfRendererPreV

Refinamientos del cambio automático de idioma

Android 14 在音频中添加了设备端多语言识别功能,并支持在语言之间自动切换,但这可能会导致丢失字词,尤其是当两次语音之间语言切换的间隔时间较短时。Android 15 添加了其他控件,以帮助应用根据其用例调整此切换。EXTRA_LANGUAGE_SWITCH_INITIAL_ACTIVE_DURATION_TIME_MILLIS 会将自动切换限制在音频会话开始时,而 EXTRA_LANGUAGE_SWITCH_MATCH_SWITCHES 会在发生指定次数的切换后停用语言切换。如果您预计会话期间只会使用一种语言,并且该语言应被自动检测到,这些选项会特别有用。

API de fuentes variables OpenType mejorada

En Android 15, se mejora la usabilidad de la fuente variable de OpenType. Ahora puedes crea una instancia de FontFamily a partir de una fuente variable sin especificarla ejes de peso con la API de buildVariableFamily. El renderizador de texto anula el valor del eje wght para que coincida con el texto que se muestra

Con la nueva API, esto simplifica el código para crear un Typeface. considerablemente:

Kotlin

val newTypeface = Typeface.CustomFallbackBuilder(
            FontFamily.Builder(
                Font.Builder(assets, "RobotoFlex.ttf").build())
                    .buildVariableFamily())
    .build()

Java

Typeface newTypeface = Typeface.CustomFallbackBuilder(
            new FontFamily.Builder(
                new Font.Builder(assets, "RobotoFlex.ttf").build())
                    .buildVariableFamily())
    .build();

Anteriormente, para crear el mismo Typeface, necesitabas mucho más código:

Kotlin

val oldTypeface = Typeface.CustomFallbackBuilder(
            FontFamily.Builder(
                Font.Builder(assets, "RobotoFlex.ttf")
                    .setFontVariationSettings("'wght' 400")
                    .setWeight(400)
                    .build())
                .addFont(
                    Font.Builder(assets, "RobotoFlex.ttf")
                        .setFontVariationSettings("'wght' 100")
                        .setWeight(100)
                        .build()
                )
                .addFont(
                    Font.Builder(assets, "RobotoFlex.ttf")
                        .setFontVariationSettings("'wght' 200")
                        .setWeight(200)
                        .build()
                )
                .addFont(
                    Font.Builder(assets, "RobotoFlex.ttf")
                        .setFontVariationSettings("'wght' 300")
                        .setWeight(300)
                        .build()
                )
                .addFont(
                    Font.Builder(assets, "RobotoFlex.ttf")
                        .setFontVariationSettings("'wght' 500")
                        .setWeight(500)
                        .build()
                )
                .addFont(
                    Font.Builder(assets, "RobotoFlex.ttf")
                        .setFontVariationSettings("'wght' 600")
                        .setWeight(600)
                        .build()
                )
                .addFont(
                    Font.Builder(assets, "RobotoFlex.ttf")
                        .setFontVariationSettings("'wght' 700")
                        .setWeight(700)
                        .build()
                )
                .addFont(
                    Font.Builder(assets, "RobotoFlex.ttf")
                        .setFontVariationSettings("'wght' 800")
                        .setWeight(800)
                        .build()
                )
                .addFont(
                    Font.Builder(assets, "RobotoFlex.ttf")
                        .setFontVariationSettings("'wght' 900")
                        .setWeight(900)
                        .build()
                ).build()
        ).build()

Java

Typeface oldTypeface = new Typeface.CustomFallbackBuilder(
    new FontFamily.Builder(
        new Font.Builder(assets, "RobotoFlex.ttf")
            .setFontVariationSettings("'wght' 400")
            .setWeight(400)
            .build()
    )
    .addFont(
        new Font.Builder(assets, "RobotoFlex.ttf")
            .setFontVariationSettings("'wght' 100")
            .setWeight(100)
            .build()
    )
    .addFont(
        new Font.Builder(assets, "RobotoFlex.ttf")
            .setFontVariationSettings("'wght' 200")
            .setWeight(200)
            .build()
    )
    .addFont(
        new Font.Builder(assets, "RobotoFlex.ttf")
            .setFontVariationSettings("'wght' 300")
            .setWeight(300)
            .build()
    )
    .addFont(
        new Font.Builder(assets, "RobotoFlex.ttf")
            .setFontVariationSettings("'wght' 500")
            .setWeight(500)
            .build()
    )
    .addFont(
        new Font.Builder(assets, "RobotoFlex.ttf")
            .setFontVariationSettings("'wght' 600")
            .setWeight(600)
            .build()
    )
    .addFont(
        new Font.Builder(assets, "RobotoFlex.ttf")
            .setFontVariationSettings("'wght' 700")
            .setWeight(700)
            .build()
    )
    .addFont(
        new Font.Builder(assets, "RobotoFlex.ttf")
            .setFontVariationSettings("'wght' 800")
            .setWeight(800)
            .build()
    )
    .addFont(
        new Font.Builder(assets, "RobotoFlex.ttf")
            .setFontVariationSettings("'wght' 900")
            .setWeight(900)
            .build()
    )
    .build()
).build();

Este es un ejemplo de cómo se creó un objeto Typeface con la API anterior y la nueva. renderiza:

Ejemplo de cómo difiere la renderización de tipos de letra cuando se usa lo nuevo y lo antiguo
APIs

En este ejemplo, el Typeface creado con la API anterior no tiene la permite crear tamaños de fuente precisos para 350, 450, 550 y 650. Font para que el procesador recurra al peso más cercano. En En este caso, se renderiza 300 en lugar de 350, se renderiza 400 en lugar de 450. y así sucesivamente. Por el contrario, el Typeface creado con las APIs nuevas crea de forma dinámica una instancia de Font para una ponderación determinada, por lo que se renderizan ponderaciones precisas para 350 450, 550 y 650.

Controles detallados de saltos de línea

A partir de Android 15, un TextView y el separador de líneas subyacente pueden preservar la parte determinada de texto en la misma línea para mejorar la legibilidad. Puedes aprovechar esta personalización de salto de línea con la etiqueta <nobreak> en los recursos de cadenas o con createNoBreakSpan. De manera similar, puedes evitar que las palabras se dividan en sílabas con la etiqueta <nohyphen> o createNoHyphenationSpan.

Por ejemplo, el siguiente recurso de cadenas no incluye un salto de línea y se renderiza con el texto "Pixel 8 Pro" que se interrumpe en un lugar no deseado:

<resources>
    <string name="pixel8pro">The power and brains behind Pixel 8 Pro.</string>
</resources>

En cambio, este recurso de cadena incluye la etiqueta <nobreak>, que une la frase "Pixel 8 Pro" y evita los saltos de línea:

<resources>
    <string name="pixel8pro">The power and brains behind <nobreak>Pixel 8 Pro.</nobreak></string>
</resources>

La diferencia en la forma en que se renderizan estas strings se muestra en las siguientes imágenes:

El diseño de una línea de texto en la que la frase "Pixel 8 Pro" no se ajusta con una etiqueta <nobreak>.
Diseño para la misma línea de texto en la que la frase "Pixel 8 Pro" se une con una etiqueta <nobreak>.

Archivado de apps

Android and Google Play announced support for app archiving last year, allowing users to free up space by partially removing infrequently used apps from the device that were published using Android App Bundle on Google Play. Android 15 includes OS level support for app archiving and unarchiving, making it easier for all app stores to implement it.

Apps with the REQUEST_DELETE_PACKAGES permission can call the PackageInstaller requestArchive method to request archiving an installed app package, which removes the APK and any cached files, but persists user data. Archived apps are returned as displayable apps through the LauncherApps APIs; users will see a UI treatment to highlight that those apps are archived. If a user taps on an archived app, the responsible installer will get a request to unarchive it, and the restoration process can be monitored by the ACTION_PACKAGE_ADDED broadcast.

Habilita el modo de 16 KB en un dispositivo con las opciones para desarrolladores

Activa la opción para desarrolladores Boot with 16KB page size para iniciar un dispositivo en el modo de 16 KB.

A partir de Android 15 QPR1, puedes usar la opción para desarrolladores que está disponible en ciertos dispositivos para iniciar el dispositivo en el modo de 16 KB y realizar pruebas en el dispositivo. Antes de usar la opción para desarrolladores, ve a Configuración -> Sistema -> Actualizaciones de software y aplica las actualizaciones disponibles.

Esta opción para desarrolladores está disponible en los siguientes dispositivos:

  • Pixel 8 y 8 Pro (con Android 15 QPR1 o versiones posteriores)

    Advertencia: Debido a un problema conocido con la versión beta 3 de QPR2 para Android 15, la pantalla táctil no funciona en dispositivos Pixel 8 después de instalar la versión beta 3 de QPR2 para Android 15 y de iniciar el dispositivo en modo de 16 KB. Este problema no afecta a los dispositivos Pixel 8 Pro.

  • Pixel 8a (con QPR1 de Android 15 o versiones posteriores)

    Advertencia: Debido a un problema conocido con la versión beta 3 de QPR2 para Android 15, la pantalla táctil no funciona en dispositivos Pixel 8a después de instalar la versión beta 3 de QPR2 para Android 15 y de iniciar el dispositivo en modo de 16 KB.

  • Pixel 9, 9 Pro y 9 Pro XL (con Android 15 QPR2 Beta 2 o versiones posteriores)

Gráficos

Android 15 incluye las mejoras de gráficos más recientes, como ANGLE y las incorporaciones al sistema de gráficos de Canvas.

Modernización del acceso a la GPU de Android

Vulkan logo

Android hardware has evolved quite a bit from the early days where the core OS would run on a single CPU and GPUs were accessed using APIs based on fixed-function pipelines. The Vulkan® graphics API has been available in the NDK since Android 7.0 (API level 24) with a lower-level abstraction that better reflects modern GPU hardware, scales better to support multiple CPU cores, and offers reduced CPU driver overhead — leading to improved app performance. Vulkan is supported by all modern game engines.

Vulkan is Android's preferred interface to the GPU. Therefore, Android 15 includes ANGLE as an optional layer for running OpenGL® ES on top of Vulkan. Moving to ANGLE will standardize the Android OpenGL implementation for improved compatibility, and, in some cases, improved performance. You can test out your OpenGL ES app stability and performance with ANGLE by enabling the developer option in Settings -> System -> Developer Options -> Experimental: Enable ANGLE on Android 15.

The Android ANGLE on Vulkan roadmap

Roadmap of upcoming changes to the Android GPU APIs.

As part of streamlining our GPU stack, going forward we will be shipping ANGLE as the GL system driver on more new devices, with the future expectation that OpenGL/ES will be only available through ANGLE. That being said, we plan to continue support for OpenGL ES on all devices.

Recommended next steps

Use the developer options to select the ANGLE driver for OpenGL ES and test your app. For new projects, we strongly encourage using Vulkan for C/C++.

Mejoras para Canvas

Android 15 继续对 Android 的 Canvas 图形系统进行现代化改造,并新增了以下功能:

  • Matrix44 提供一个 4x4 矩阵来转换坐标,当您想在 3D 中操控画布时,应使用此矩阵。
  • clipShader 会将当前剪裁区域与指定的着色器相交,而 clipOutShader 会将剪裁区域设为当前剪裁区域与着色器的差值,每个操作都会将着色器视为一个 Alpha 遮罩。这支持高效地绘制复杂形状。

Rendimiento y batería

Android se enfoca en ayudarte a mejorar el rendimiento y la calidad de tus apps. Android 15 presenta APIs que ayudan a que las tareas de tu app sean más eficientes para ejecutarse, optimizar el rendimiento de la app y recopilar estadísticas sobre estas.

Para conocer las prácticas recomendadas que permiten ahorrar batería, depurar el uso de la red y la energía, y obtener detalles sobre cómo mejoramos la eficiencia de la batería del trabajo en segundo plano en Android 15 y versiones recientes de Android, consulta la charla Improving battery efficiency of background work on Android de Google I/O.

API de ApplicationStartInfo

En versiones anteriores de Android, el inicio de la app era un misterio. Era difícil determinar dentro de tu app si se inició desde un estado en frío, semicaliente o en caliente. También era difícil saber cuánto tiempo pasó tu app durante las diferentes fases del lanzamiento: bifurcar el proceso, llamar a onCreate, dibujar el primer fotograma y mucho más. Cuando se creó una instancia de tu clase Application, no tenías ninguna manera de saber si la app se inició desde una transmisión, un proveedor de contenido, un trabajo, una copia de seguridad, un inicio completo, una alarma o un Activity.

La API de ApplicationStartInfo en Android 15 proporciona todo esto y mucho más. Incluso puedes agregar tus propias marcas de tiempo al flujo para ayudar a recopilar datos de tiempo en un solo lugar. Además de recopilar métricas, puedes usar ApplicationStartInfo para ayudar a optimizar directamente el inicio de la app. Por ejemplo, puedes eliminar la creación de instancias costosa de bibliotecas relacionadas con la IU dentro de tu clase Application cuando se inicia la app debido a una transmisión.

Información detallada del tamaño de la app

Desde Android 8.0 (nivel de API 26), Android incluye la API de StorageStats.getAppBytes que resume el tamaño instalado de una app como un solo número de bytes, que es la suma del tamaño del APK, el tamaño de los archivos extraídos del APK y los archivos que se generaron en el dispositivo, como el código compilado por adelantado (AOT). Este número no es muy útil en términos de cómo tu app usa el almacenamiento.

Android 15 agrega la API de StorageStats.getAppBytesByDataType([type]), que te permite obtener estadísticas sobre cómo tu app usa todo ese espacio, incluidas las divisiones de archivos APK, el código relacionado con AOT y la aceleración, los metadatos de DEX, las bibliotecas y los perfiles guiados.

Creación de perfiles administrada por la app

Android 15 includes the ProfilingManager class, which lets you collect profiling information from within your app such as heap dumps, heap profiles, stack sampling, and more. It provides a callback to your app with a supplied tag to identify the output file, which is delivered to your app's files directory. The API does rate limiting to minimize the performance impact.

To simplify constructing profiling requests in your app, we recommend using the corresponding Profiling AndroidX API, available in Core 1.15.0-rc01 or higher.

Mejoras en la base de datos SQLite

Android 15 presenta las APIs de SQLite que exponen funciones avanzadas del un motor SQLite subyacente que se dirija a problemas de rendimiento específicos que pueden en las apps. Estas APIs se incluyen con la actualización de SQLite a la versión 3.44.3

Los desarrolladores deben consultar las prácticas recomendadas para el rendimiento de SQLite para aprovechar al máximo su base de datos, en especial cuando trabajan con bases de datos grandes o cuando ejecutan consultas sensibles a la latencia.

  • Transacciones diferidas de solo lectura: Cuando emitas transacciones de solo lectura (no incluyas instrucciones de escritura), usa beginTransactionReadOnly() y beginTransactionWithListenerReadOnly(SQLiteTransactionListener) para emitir transacciones DEFERRED de solo lectura. Estas transacciones se pueden ejecutar de forma simultánea entre sí y, si la base de datos está en modo WAL, se pueden ejecutar de forma simultánea con transacciones IMMEDIATE o EXCLUSIVE.
  • Recuento y IDs de filas: Se agregaron APIs para recuperar el recuento de filas modificadas o el ID de la última fila insertada sin emitir una consulta adicional. getLastChangedRowCount() muestra la cantidad de filas que se insertaron, actualizaron o borraron mediante la instrucción de SQL más reciente en la transacción actual, mientras que getTotalChangedRowCount() devuelve el recuento de la conexión actual. getLastInsertRowId() muestra el rowid de la última fila que se insertará en la conexión actual.
  • Sentencias sin procesar: Emite una sentencia SQlite sin procesar, omitiendo los wrappers de conveniencia y cualquier sobrecarga de procesamiento adicional que puedan generar.

Actualizaciones del framework de rendimiento dinámico de Android

Android 15 继续投资于 Android 动态性能框架 (ADPF),这是一组 API,可让游戏和性能密集型应用更为直接地与 Android 设备的电源和散热系统进行互动。在受支持的设备上,Android 15 添加了 ADPF 功能:

  • 针对提示会话的节能模式,用于指明其关联的线程应优先节能而非性能,非常适合长时间运行的后台工作负载。
  • 系统可以在提示会话中报告 GPU 和 CPU 工作时长,以便同时调整 CPU 和 GPU 频率,以最佳方式满足工作负载需求。
  • 热余量阈值,用于根据余量预测来解读可能的热节流状态。

如需详细了解如何在应用和游戏中使用 ADPF,请参阅相关文档

Privacidad

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

Detección de grabación de pantalla

Android 15 增加了对应用的支持,以检测 正在录制。每当应用转换时,系统都会调用回调 在屏幕录制内容中处于可见与隐藏状态之间。如果正在记录注册进程的 UID 拥有的 activity,则系统会将应用视为可见。这样一来,如果您的应用执行敏感操作,您就可以告知用户正在录制他们的操作。

val mCallback = Consumer<Int> { state ->
  if (state == SCREEN_RECORDING_STATE_VISIBLE) {
    // We're being recorded
  } else {
    // We're not being recorded
  }
}

override fun onStart() {
   super.onStart()
   val initialState =
      windowManager.addScreenRecordingCallback(mainExecutor, mCallback)
   mCallback.accept(initialState)
}

override fun onStop() {
    super.onStop()
    windowManager.removeScreenRecordingCallback(mCallback)
}

Se expandieron las capacidades de IntentFilter

Android 15 incluye compatibilidad con una resolución Intent más precisa a través de UriRelativeFilterGroup, que contiene un conjunto de objetos UriRelativeFilter que forman un conjunto de reglas de coincidencia Intent que deben cumplirse, incluidos los parámetros de consulta de URL, los fragmentos de URL y las reglas de bloqueo o exclusión.

Estas reglas se pueden definir en el archivo en formato XML AndroidManifest con la etiqueta <uri-relative-filter-group>, que puede incluir, de manera opcional, una etiqueta android:allow. Estas etiquetas pueden contener etiquetas <data> que usan atributos de etiqueta de datos existentes, así como los atributos android:query y android:fragment.

Este es un ejemplo de la sintaxis de AndroidManifest:

<intent-filter>
  <action android:name="android.intent.action.VIEW" />
  <category android:name="android.intent.category.BROWSABLE" />
  <category android:name="android.intent.category.DEFAULT" />
  <data android:scheme="http" />
  <data android:scheme="https" />
  <data android:domain="astore.com" />
  <uri-relative-filter-group>
    <data android:pathPrefix="/auth" />
    <data android:query="region=na" />
  </uri-relative-filter-group>
  <uri-relative-filter-group android:allow="false">
    <data android:pathPrefix="/auth" />
    <data android:query="mobileoptout=true" />
  </uri-relative-filter-group>
  <uri-relative-filter-group android:allow="false">
    <data android:pathPrefix="/auth" />
    <data android:fragmentPrefix="faq" />
  </uri-relative-filter-group>
</intent-filter>

Espacio privado

可通过解锁和锁定私密空间,在设备上显示或隐藏敏感应用。

借助私密空间,用户可以在设备上创建一个单独的空间,在额外的身份验证层保护下,防止敏感应用遭到窥探。私密空间使用单独的用户个人资料。用户可以选择使用设备锁定方式或为私密空间使用单独的锁定方式。

私密空间中的应用会显示在启动器的单独容器中,并且当私密空间处于锁定状态时,这些应用不会显示在“最近用过”视图、通知、“设置”和其他应用中。用户生成的内容和下载的内容(例如媒体内容或文件)以及账号在私密空间和主空间之间是分开的。在私密空间处于解锁状态时,您可以使用系统 Sharesheet照片选择器向应用授予对各个空间中内容的访问权限。

用户无法将现有应用及其数据移至私密空间。相反,用户可以在私密空间中选择安装选项,以便使用他们偏好的任意应用商店安装应用。私密空间中的应用会作为主空间中任何应用的单独副本进行安装(同一应用的新副本)。

当用户锁定私密空间时,系统会停止该个人资料。在个人资料停止运行时,私密空间中的应用将不再处于活动状态,无法执行前台或后台活动,包括显示通知。

我们建议您使用私密空间测试应用,以确保应用能按预期运行,尤其是当您的应用属于以下某一类别时:

Cómo consultar la selección más reciente del usuario para el acceso a Fotos seleccionadas

现在,如果应用获得了部分访问权限,则只能突出显示最近选择的照片和视频。此功能可以改善频繁请求访问照片和视频的应用的用户体验。如需在应用中使用此功能,请在通过 ContentResolver 查询 MediaStore 时启用 QUERY_ARG_LATEST_SELECTION_ONLY 参数。

Kotlin

val externalContentUri = MediaStore.Files.getContentUri("external")

val mediaColumns = arrayOf(
   FileColumns._ID,
   FileColumns.DISPLAY_NAME,
   FileColumns.MIME_TYPE,
)

val queryArgs = bundleOf(
   // Return only items from the last selection (selected photos access)
   QUERY_ARG_LATEST_SELECTION_ONLY to true,
   // Sort returned items chronologically based on when they were added to the device's storage
   QUERY_ARG_SQL_SORT_ORDER to "${FileColumns.DATE_ADDED} DESC",
   QUERY_ARG_SQL_SELECTION to "${FileColumns.MEDIA_TYPE} = ? OR ${FileColumns.MEDIA_TYPE} = ?",
   QUERY_ARG_SQL_SELECTION_ARGS to arrayOf(
       FileColumns.MEDIA_TYPE_IMAGE.toString(),
       FileColumns.MEDIA_TYPE_VIDEO.toString()
   )
)

Java

Uri externalContentUri = MediaStore.Files.getContentUri("external");

String[] mediaColumns = {
    FileColumns._ID,
    FileColumns.DISPLAY_NAME,
    FileColumns.MIME_TYPE
};

Bundle queryArgs = new Bundle();
queryArgs.putBoolean(MediaStore.QUERY_ARG_LATEST_SELECTION_ONLY, true);
queryArgs.putString(MediaStore.QUERY_ARG_SQL_SORT_ORDER, FileColumns.DATE_ADDED + " DESC");
queryArgs.putString(MediaStore.QUERY_ARG_SQL_SELECTION, FileColumns.MEDIA_TYPE + " = ? OR " + FileColumns.MEDIA_TYPE + " = ?");
queryArgs.putStringArray(MediaStore.QUERY_ARG_SQL_SELECTION_ARGS, new String[] {
    String.valueOf(FileColumns.MEDIA_TYPE_IMAGE),
    String.valueOf(FileColumns.MEDIA_TYPE_VIDEO)
});

Privacy Sandbox en Android

Android 15 包含最新的 Android 广告服务扩展,其中包含最新版本的 Privacy Sandbox on Android。我们一直致力于开发可更好地保护用户隐私,并为移动应用打造高效的个性化广告体验的技术,此次添加新功能就是其中的一项举措。我们的 Privacy Sandbox 页面详细介绍了 Privacy Sandbox on Android 开发者预览版和 Beta 版计划,可帮助您上手使用。

Health Connect

Android 15 integrates the latest extensions around Health Connect by Android, a secure and centralized platform to manage and share app-collected health and fitness data. This update adds support for additional data types across fitness, nutrition, skin temperature, training plans, and more.

Skin temperature tracking allows users to store and share more accurate temperature data from a wearable or other tracking device.

Training plans are structured workout plans to help a user achieve their fitness goals. Training plans support includes a variety of completion and performance goals:

Learn more about the latest updates to Health Connect in Android in the Building adaptable experiences with Android Health talk from Google I/O.

Compartir pantalla de una app

Android 15 支持应用屏幕共享,因此用户可以仅共享或录制应用窗口,而不是整个设备屏幕。此功能首次在 Android 14 QPR2 中启用,包含 MediaProjection 回调,可让您的应用自定义应用屏幕共享体验。请注意,对于以 Android 14(API 级别 34)或更高版本为目标平台的应用,每个 MediaProjection 捕获会话都需要征得用户同意

Experiencia del usuario y IU del sistema

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

Si deseas obtener más información para usar las mejoras más recientes de Android 15 y mejorar la experiencia del usuario de tu app, consulta la charla Cómo mejorar la experiencia del usuario de tu app para Android de Google I/O.

Vistas previas de widgets más enriquecidas con la API de Generated Previews

Before Android 15, the only way to provide widget picker previews was to specify a static image or layout resource. These previews often differ significantly from the look of the actual widget when it is placed on the home screen. Also, static resources can't be created with Jetpack Glance, so a Glance developer had to screenshot their widget or create an XML layout to have a widget preview.

Android 15 adds support for generated previews. This means that app widget providers can generate RemoteViews to use as the picker preview, instead of a static resource.

Apps can provide Remote Views to the Widget Picker, so they can update the content in the picker to be more representative of what the user will see.

Push API

Apps can provide generated previews through a push API. Apps can provide previews at any point in their lifecycle, and don't receive an explicit request from the host to provide previews. Previews are persisted in AppWidgetService, and hosts can request them on-demand. The following example loads an XML widget layout resource and sets it as the preview:

AppWidgetManager.getInstance(appContext).setWidgetPreview(
   ComponentName(
       appContext,
       SociaLiteAppWidgetReceiver::class.java
   ),
   AppWidgetProviderInfo.WIDGET_CATEGORY_HOME_SCREEN,
   RemoteViews("com.example", R.layout.widget_preview)
)

The expected flow is:

  1. At any time, the widget provider calls setWidgetPreview. The provided previews are persisted in AppWidgetService with other provider info.
  2. setWidgetPreview notifies hosts of an updated preview through the AppWidgetHost.onProvidersChanged callback. In response, the widget host reloads all of its provider information.
  3. When displaying a widget preview, the host checks AppWidgetProviderInfo.generatedPreviewCategories, and if the chosen category is available, calls AppWidgetManager.getWidgetPreview to return the saved preview for this provider.

When to call setWidgetPreview

Because there is no callback to provide previews, apps can choose to send previews at any point when they are running. How often to update the preview depends on the widget's use case.

The following list describes the two main categories of preview use cases:

  • Providers that show real data in their widget previews, such as personalized or recent information. These providers can set the preview once the user has signed in or has done initial configuration in their app. After this, they can set up a periodic task to update the previews at their chosen cadence. Examples of this type of widget could be a photo, calendar, weather or news widget.
  • Providers that show static information in previews or quick-action widgets that don't display any data. These providers can set previews once, when the app first launches. Examples of this type of widget include a drive quick actions widget or chrome shortcuts widget.

Some providers might show static previews on the hub mode picker, but real information on the homescreen picker. These providers should follow the guidance for both of these use cases to set previews.

Pantalla en pantalla

Android 15 introduces changes in Picture-in-Picture (PiP) ensuring an even smoother transition when entering into PiP mode. This will be beneficial for apps having UI elements overlaid on top of their main UI, which goes into PiP.

Developers use the onPictureInPictureModeChanged callback to define logic that toggles the visibility of the overlaid UI elements. This callback is triggered when the PiP enter or exit animation is completed. Beginning in Android 15, the PictureInPictureUiState class includes another state.

With this UI state, apps targeting Android 15 (API level 35) will observe the Activity#onPictureInPictureUiStateChanged callback being invoked with isTransitioningToPip() as soon as the PiP animation starts. There are many UI elements that are not relevant for the app when it is in PiP mode, for example views or layout that include information such as suggestions, upcoming video, ratings, and titles. When the app goes to PiP mode, use the onPictureInPictureUiStateChanged callback to hide these UI elements. When the app goes to full screen mode from the PiP window, use onPictureInPictureModeChanged callback to unhide these elements, as shown in the following examples:

override fun onPictureInPictureUiStateChanged(pipState: PictureInPictureUiState) {
        if (pipState.isTransitioningToPip()) {
          // Hide UI elements
        }
    }
override fun onPictureInPictureModeChanged(isInPictureInPictureMode: Boolean) {
        if (isInPictureInPictureMode) {
          // Unhide UI elements
        }
    }

This quick visibility toggle of irrelevant UI elements (for a PiP window) helps ensure a smoother and flicker-free PiP enter animation.

Reglas mejoradas de No interrumpir

AutomaticZenRule 允许应用自定义注意力机制 管理(勿扰)规则,并确定何时启用或停用 。Android 15 极大地增强了这些规则,旨在提高 用户体验。其中包含以下增强功能:

  • AutomaticZenRule 添加类型,让系统能够应用特殊类型 对某些规则的处理
  • AutomaticZenRule 添加图标,使模式更加丰富 易于识别。
  • triggerDescription 字符串添加到 AutomaticZenRule,用于描述 规则应当对用户生效的条件。
  • 已添加 ZenDeviceEffects 更改为AutomaticZenRule,从而允许规则触发灰度等操作 显示、夜间模式或调暗壁纸。

Cómo establecer VibrationEffect para los canales de notificaciones

Android 15 admite la configuración de vibraciones enriquecidas para las notificaciones entrantes canal con NotificationChannel.setVibrationEffect, por lo que los usuarios pueden distinguir entre distintos tipos de notificaciones tener que mirar su dispositivo.

Chip de la barra de estado de la proyección de contenido multimedia y detención automática

媒体投放可能会泄露用户的私密信息。一个醒目的新状态栏条状标签可让用户了解任何正在进行的屏幕投影。用户可以点按该条状标签停止投屏、共享或录制屏幕。此外,为了提供更直观的用户体验,当设备屏幕锁定后,所有正在进行的屏幕投影都会自动停止。

Chip de la barra de estado para compartir pantalla, transmitir y grabar.

Pantallas grandes y factores de forma

Android 15 les brinda a tus apps la compatibilidad para aprovechar al máximo los factores de forma de Android, incluidas las pantallas grandes, los dispositivos plegables y los plegables.

Mejoras en la realización de varias tareas en pantallas grandes

Android 15 为用户提供了在大屏设备上更好地进行多任务处理的方式。对于 例如,用户可以保存自己喜爱的分屏应用组合, 访问并固定屏幕上的任务栏,以便在应用之间快速切换。这意味着 让应用具备自适应能力比以往任何时候都更加重要。

Google I/O 大会上有一些关于构建自适应 Android 的会议 应用使用 Material 3 构建界面 自适应库 我们的文档中提供了更多帮助信息,帮助您针对大型语言 。

Compatibilidad con la pantalla de la cubierta

Your app can declare a property that Android 15 uses to allow your Application or Activity to be presented on the small cover screens of supported flippable devices. These screens are too small to be considered as compatible targets for Android apps to run on, but your app can opt in to supporting them, making your app available in more places.

Conectividad

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

Asistencia satelital

Android 15 继续扩大对卫星连接的平台支持,并包含一些界面元素,以确保在整个卫星连接环境中提供一致的用户体验。

应用可以使用 ServiceState.isUsingNonTerrestrialNetwork() 执行以下操作: 检测设备是否连接到卫星,让他们更清楚地了解 可能会导致完全网络服务不可用的原因此外,Android 15 支持短信和彩信应用以及预加载的 RCS 应用,以便使用卫星连接发送和接收消息。

当设备连接到卫星时,系统会显示通知。

Experiencias de NFC más fluidas

Android 15 is working to make the tap to pay experience more seamless and reliable while continuing to support Android's robust NFC app ecosystem. On supported devices, apps can request the NfcAdapter to enter observe mode, where the device listens but doesn't respond to NFC readers, sending the app's NFC service PollingFrame objects to process. The PollingFrame objects can be used to auth ahead of the first communication to the NFC reader, allowing for a one tap transaction in many cases.

In addition, apps can register a filter on supported devices so they can be notified of polling loop activity, which allows for smooth operation with multiple NFC-aware applications.

Rol de la billetera

Android 15 introduces a Wallet role that allows tighter integration with the user's preferred wallet app. This role replaces the NFC default contactless payment setting. Users can manage the Wallet role holder by navigating to Settings > Apps > Default Apps.

The Wallet role is used when routing NFC taps for AIDs registered in the payment category. Taps always go to the Wallet role holder unless another app that is registered for the same AID is running in the foreground.

This role is also used to determine where the Wallet Quick Access tile should go when activated. When the role is set to "None", the Quick Access tile isn't available and payment category NFC taps are only delivered to the foreground app.

Seguridad

Android 15 te ayuda a mejorar la seguridad de tu app, proteger sus datos y brindarles a los usuarios más transparencia y control sobre sus datos. Mira la charla Protección de la seguridad del usuario en Android de Google I/O para obtener más información sobre lo que estamos haciendo para mejorar las protecciones del usuario y proteger tu app contra nuevas amenazas.

Cómo integrar Credential Manager con el autocompletado

从 Android 15 开始,开发者可以将用户名或密码字段等特定视图与 Credential Manager 请求相关联,从而更轻松地在登录过程中提供量身定制的用户体验。当用户聚焦于其中一个视图时,系统会向 Credential Manager 发送相应请求。系统会汇总来自各个提供商的凭据,并在自动填充后备界面(例如内嵌建议或下拉菜单建议)中显示这些凭据。Jetpack androidx.credentials 库是开发者首选的端点,很快将在 Android 15 及更高版本中推出,以进一步增强此功能。

Cómo integrar el registro y el acceso con un solo toque con solicitudes biométricas

Credential Manager integrates biometric prompts into the credential creation and sign-in processes, eliminating the need for providers to manage biometric prompts. As a result, credential providers only need to focus on the results of the create and get flows, augmented with the biometric flow result. This simplified process creates a more efficient and streamlined credential creation and retrieval process.

Administración de claves para la encriptación de extremo a extremo

We are introducing the E2eeContactKeysManager in Android 15, which facilitates end-to-end encryption (E2EE) in your Android apps by providing an OS-level API for the storage of cryptographic public keys.

The E2eeContactKeysManager is designed to integrate with the platform contacts app to give users a centralized way to manage and verify their contacts' public keys.

Verificaciones de permisos en URIs de contenido

Android 15 引入了一组用于对内容 URI 执行权限检查的 API:

Accesibilidad

Android 15 agrega funciones que mejoran la accesibilidad para los usuarios.

Braille mejorado

In Android 15, we've made it possible for TalkBack to support Braille displays that are using the HID standard over both USB and secure Bluetooth.

This standard, much like the one used by mice and keyboards, will help Android support a wider range of Braille displays over time.

Internacionalización

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

Fuente variable CJK

Starting with Android 15, the font file for Chinese, Japanese, and Korean (CJK) languages, NotoSansCJK, is now a variable font. Variable fonts open up possibilities for creative typography in CJK languages. Designers can explore a broader range of styles and create visually striking layouts that were previously difficult or impossible to achieve.

How the variable font for Chinese, Japanese, and Korean (CJK) languages appears with different font widths.

Justificación entre caracteres

Starting with Android 15, text can be justified utilizing letter spacing by using JUSTIFICATION_MODE_INTER_CHARACTER. Inter-word justification was first introduced in Android 8.0 (API level 26), and inter-character justification provides similar capabilities for languages that use the whitespace character for segmentation, such as Chinese, Japanese, and others.

Layout for Japanese text using JUSTIFICATION_MODE_NONE.
Layout for English text using JUSTIFICATION_MODE_NONE.


Layout for Japanese text using JUSTIFICATION_MODE_INTER_WORD.
Layout for English text using JUSTIFICATION_MODE_INTER_WORD.


Layout for Japanese text using the JUSTIFICATION_MODE_INTER_CHARACTER.
Layout for English text using the JUSTIFICATION_MODE_INTER_CHARACTER.

Configuración de saltos de línea automáticos

Android comenzó a admitir saltos de línea basados en frases para japonés y coreano en Android 13 (nivel de API 33) Sin embargo, aunque los saltos de línea basados en frases mejoran la la legibilidad de las líneas de texto cortas, no funcionan bien para las líneas de texto largas. En Android 15, las apps pueden aplicar saltos de línea basados en frases solo para líneas breves de texto con la opción LINE_BREAK_WORD_STYLE_AUTO. Esta opción selecciona la mejor opción de estilo de palabra para el texto.

Para las líneas cortas de texto, se utilizan saltos de línea basados en frases, que funcionan de la misma manera. como LINE_BREAK_WORD_STYLE_PHRASE, como se muestra en el siguiente imagen:

Para líneas de texto cortas, LINE_BREAK_WORD_STYLE_AUTO Aplica saltos de línea basados en frases para mejorar la legibilidad del texto. Esto es lo mismo que aplicar LINE_BREAK_WORD_STYLE_PHRASE

Para líneas de texto más largas, LINE_BREAK_WORD_STYLE_AUTO usa el prefijo "no" de salto de línea y que funcione igual que LINE_BREAK_WORD_STYLE_NONE, como se muestra en el siguiente imagen:

Para líneas de texto largas, LINE_BREAK_WORD_STYLE_AUTO No aplica ningún estilo de palabra de salto de línea para mejorar la legibilidad del texto. Esto es lo mismo que aplicar LINE_BREAK_WORD_STYLE_NONE

Fuente japonesa Hentaigana adicional

In Android 15, a font file for old Japanese Hiragana (known as Hentaigana) is bundled by default. The unique shapes of Hentaigana characters can add a distinctive flair to artwork or design while also helping to preserve accurate transmission and understanding of ancient Japanese documents.

Character and text style for the Japanese Hentaigana font.

VideoLAN cone Copyright (c) 1996-2010 VideoLAN. This logo or a modified version may be used or modified by anyone to refer to the VideoLAN project or any product developed by the VideoLAN team, but does not indicate endorsement by the project.

Vulkan and the Vulkan logo are registered trademarks of the Khronos Group Inc.

OpenGL is a registered trademark and the OpenGL ES logo is a trademark of Hewlett Packard Enterprise used by permission by Khronos.