Die Android 15-Plattform umfasst Verhaltensänderungen, die sich auf Ihre App auswirken können. Die folgenden Änderungen gelten für alle Apps, wenn sie unter Android 15 ausgeführt werden, unabhängig von targetSdkVersion
. Sie sollten Ihre App testen und dann bei Bedarf so anpassen, dass sie ordnungsgemäß unterstützt wird.
Sieh dir unbedingt auch die Liste der Änderungen des Verhaltens, die sich nur auf Apps auswirken, die auf Android 15 ausgerichtet sind an.
Hauptfunktion
Mit Android 15 werden verschiedene Kernfunktionen des Android-Systems modifiziert oder erweitert.
Änderungen am Status „angehalten des Pakets“
The intention of the package FLAG_STOPPED
state (which users
can engage in AOSP builds by long-pressing an app icon and selecting "Force
Stop") has always been to keep apps in this state until the user explicitly
removes the app from this state by directly launching the app or indirectly
interacting with the app (through the sharesheet or a widget, selecting the app
as live wallpaper, etc.). In Android 15, we are updating the behavior of the
system to be aligned with this intended behavior. Apps should only be removed
from the stopped state through direct or indirect user action.
To support the intended behavior, in addition to the existing restrictions, the
system will also cancel all pending intents when the app enters
the stopped state on Android 15. When the user's actions remove the app from the
stopped state, the ACTION_BOOT_COMPLETED
broadcast
will be delivered to the app providing an opportunity to re-register any pending
intents.
You can call the new
ApplicationStartInfo.wasForceStopped()
method to confirm whether the app was put into the stopped state.
Kamera und Medien
Unter Android 15 werden für alle Apps die folgenden Änderungen am Kamera- und Medienverhalten vorgenommen.
Direkte und ausgelagerte Audiowiedergabe macht jetzt zuvor offene direkte Aktivitäten ungültig oder lagert Audiotracks aus, wenn Ressourcenlimits erreicht sind
Before Android 15, if an app requested direct or offload audio playback while
another app was playing audio and the resource limits were reached, the app
would fail to open a new AudioTrack
.
Beginning with Android 15, when an app requests direct or offload
playback and the resource
limits are reached, the system invalidates any currently open
AudioTrack
objects which prevent fulfilling the new track request.
(Direct and offload audio tracks are typically opened for playback of compressed audio formats. Common use-cases for playing direct audio include streaming encoded audio over HDMI to a TV. Offload tracks are typically used to play compressed audio on a mobile device with hardware DSP acceleration.)
Einstellung von Produkten und Funktionen
Mit jedem Release können bestimmte Android APIs veraltet sein oder refaktoriert werden, um die Entwicklererfahrung zu verbessern oder neue Plattformfunktionen zu unterstützen. In diesen Fällen stellen wir die veralteten APIs offiziell ein und leiten die Entwickler stattdessen zu alternativen APIs weiter.
Wir haben den offiziellen Support für die APIs eingestellt. Sie stehen Entwicklern aber weiterhin zur Verfügung. Weitere Informationen zu wichtigen Einstellungen in diesem Android-Release finden Sie auf der Seite zu veralteten Versionen.