בכל גרסה, יכול להיות שממשקי API ספציפיים של Android יוצאו משימוש או שיהיה צורך לבצע בהם שינוי כדי לספק חוויית פיתוח טובה יותר או לתמוך ביכולות חדשות בפלטפורמה. במקרים כאלה, אנחנו מודיעים באופן רשמי על הוצאה משימוש של ממשקי ה-API הלא רלוונטיים ומפנים את המפתחים לממשקי API חלופיים לשימוש במקום זאת.
המשמעות של הוצאה משימוש היא שסיימנו את התמיכה הרשמית ב-API, אבל הם ימשיכו להיות זמינים למפתחים. בדף הזה נסקור כמה מהתכונות שהוצאו משימוש במהדורה הזו של Android. כדי לראות עוד פריטים שהוצאו משימוש, תוכלו לעיין בדוח ההבדלים של ממשקי ה-API.
שימוש ב-Spatializer במקום ב-Virtualizer
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, the Virtualizer
class is
deprecated. 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.
WebSQL הוצא משימוש ב-Android WebView
setDatabaseEnabled
和 getDatabaseEnabled
现已废弃 WebSettings
中的方法。这些设置已激活支持
并在 Webview 中
运行 WebSQLWebSQL 现已从 Chrome 中移除,并且在 Android WebView 中已废弃。在接下来的 12 个月内,这些方法在所有 Android 版本中都会变为免运维状态。
万维网联盟 (W3C) 鼓励需要 Web 数据库的应用采用 Web Storage API 技术,例如 localStorage 和 sessionStorage,或 IndexedDB。浏览器中由源私有文件系统支持的 SQLite Wasm 概述了基于 SQLite 数据库的一组替代技术,这些技术编译为 Web Assembly (Wasm),并由源私有文件系统支持,以实现更直接的 WebSQL 代码迁移。