非推奨のサービスと機能

リリースのたびに、特定の Android API が古くなったり、デベロッパー エクスペリエンスの向上や新しいプラットフォーム機能のサポートのためにリファクタリングされたりすることがあります。このような場合は、古い API を正式に非推奨とし、代わりに使用できる代替 API をデベロッパーに案内します。

非推奨とは、API の公式サポートを終了したことを指しますが、デベロッパーは引き続き API を使用できます。このページでは、Android のこのリリースにおける主な非推奨化について説明します。その他の非推奨については、API 差分レポートをご覧ください。

Virtualizer の代わりに Spatializer を使用する

First added in Android 12 (API level 32), the Spatializer class lets apps query the capabilities and behavior of sound spatialization on the device. In Android 15, we're deprecating the Virtualizer class. Use AudioAttributes.Builder.setSpatializationBehavior instead to characterize how you want your content to be played when spatialization is supported.

AndroidX media3 ExoPlayer 1.0 enables spatial audio by default for multichannel audio when the device supports it. See this recent blog post and the spatial audio documentation for more information, including APIs to control the feature.

Android WebView で WebSQL のサポート終了

The setDatabaseEnabled and getDatabaseEnabled methods from WebSettings are now deprecated. These settings activated support for WebSQL inside Webview. WebSQL is now removed in Chrome and is now deprecated on Android Webview. These methods will become a no-op on all Android versions in the next 12 months.

The World Wide Web Consortium (W3C) encourages apps needing web databases to adopt Web Storage API technologies like localStorage and sessionStorage, or IndexedDB. SQLite Wasm in the browser backed by the Origin Private File System outlines a replacement set of technologies based on the SQLite database, compiled to Web Assembly (Wasm), and backed by the origin private file system to enable more direct migration of WebSQL code.