自 2025 年 3 月 27 日起,我們建議您使用 android-latest-release
而非 aosp-main
建構及貢獻 AOSP。詳情請參閱「Android 開放原始碼計畫變更」。
超寬頻
透過集合功能整理內容
你可以依據偏好儲存及分類內容。
從 Android 13 開始,Android 便內建超寬頻 (UWB) 無線電技術的預設架構實作,這項技術可在支援的裝置之間提供高度安全且精確的測距功能。平台 AOSP UWB 堆疊可做為裝置製造商的選用模組使用。如要進一步瞭解這個模組,請參閱「模組:UWB」。
建築
UWB 堆疊包含 UWB 主線模組和 UWB 晶片供應商提供的 HAL 實作,如圖 1 所示。
圖 1. UWB 堆疊架構
Android 開放原始碼計畫堆疊
AOSP UWB 堆疊是以選用模組 com.google.android.uwb
的形式封裝,包含下列元件:
- UWB 平台 API 途徑
- 程式碼位置:
packages/modules/Uwb/framework
- 支援資料庫
- 程式碼位置:
packages/modules/Uwb/service/support_lib
- UwbService 層和 Common Service Management Layer (CSML) 定義的元件,由 FiRa 定義
- 程式碼位置:
packages/modules/Uwb/service
- Rust 原生 UCI 層
- 根據 FiRa 定義的 UWB 指令介面 (UCI) 規格,建立 UWB HAL 介面
- 程式碼位置:
hardware/interfaces/uwb
供應商元件
供應商堆疊包含 UWB HAL 供應商實作項目、UWB 驅動程式和 UWB 裝置。
UWB 適用的 API 介面
UWB 堆疊包含系統應用程式和第三方應用程式的 API 途徑。
系統應用程式
裝置製造商會使用 android.uwb.UwbManager
系統 API 介面,允許系統應用程式進行低階存取。如要使用這個 API 途徑,系統應用程式必須使用支援資料庫 (packages/modules/Uwb/service/support_lib
)。
第三方應用程式
第三方應用程式會使用 Jetpack UWB 公用 API 介面 androidx.core.uwb
。詳情請參閱「超寬頻通訊」。
驗證
如要驗證 UWB 的導入方式,請確認裝置通過 /cts/tests/uwb
底下的 CTS 測試。
這個頁面中的內容和程式碼範例均受《內容授權》中的授權所規範。Java 與 OpenJDK 是 Oracle 和/或其關係企業的商標或註冊商標。
上次更新時間:2025-07-27 (世界標準時間)。
[[["容易理解","easyToUnderstand","thumb-up"],["確實解決了我的問題","solvedMyProblem","thumb-up"],["其他","otherUp","thumb-up"]],[["缺少我需要的資訊","missingTheInformationINeed","thumb-down"],["過於複雜/步驟過多","tooComplicatedTooManySteps","thumb-down"],["過時","outOfDate","thumb-down"],["翻譯問題","translationIssue","thumb-down"],["示例/程式碼問題","samplesCodeIssue","thumb-down"],["其他","otherDown","thumb-down"]],["上次更新時間:2025-07-27 (世界標準時間)。"],[],[],null,["# Ultra-wideband\n\nFrom Android 13, Android includes a default framework\nimplementation for ultra-wideband (UWB) radio technology, a technology that\nenables highly secure, precise ranging between supported devices. The platform\nAOSP UWB stack is available as an optional\n[module](/docs/core/architecture/modular-system) for device manufacturers.\nFor more details on the module, see\n[Module: UWB](/docs/core/ota/modular-system/uwb).\n\nArchitecture\n------------\n\nThe UWB stack consists of the UWB mainline module and the HAL implementation\nprovided by a UWB chip vendor as shown in Figure 1.\n\n**Figure 1.** UWB stack architecture\n\n### AOSP stack\n\nThe AOSP UWB stack, packaged as an optional module, `com.google.android.uwb`,\ncontains the following components:\n\n- UWB platform API surface\n - Code location: `packages/modules/Uwb/framework`\n- Support library\n - Code location: `packages/modules/Uwb/service/support_lib`\n- UwbService layer and Common Service Management Layer (CSML) defined components defined by [FiRa](https://www.firaconsortium.org/)\n - Code location: `packages/modules/Uwb/service`\n- Rust native UCI layer\n - Code location: `external/uwb`\n- UWB HAL interface based on the UWB command interface (UCI) specification defined by [FiRa](https://www.firaconsortium.org/)\n - Code location: `hardware/interfaces/uwb`\n\n### Vendor components\n\nThe vendor stack includes a UWB HAL vendor implementation, UWB driver, and a\nUWB device.\n\nAPI surfaces for UWB\n--------------------\n\nThe UWB stack includes API surfaces for system apps and third-party apps.\n\n### System apps\n\nDevice manufacturers use the\n[`android.uwb.UwbManager`](https://cs.android.com/android/platform/superproject/+/android-latest-release:packages/modules/Uwb/framework/java/android/uwb/UwbManager.java)\nsystem API surface to allow low-level access for system apps. To use this\nAPI surface, system apps must use the support library\n(`packages/modules/Uwb/service/support_lib`).\n\n### Third-party apps\n\nThird-party apps use the Jetpack UWB public API surface,\n[`androidx.core.uwb`](https://developer.android.com/reference/kotlin/androidx/core/uwb/package-summary).\nFor more information, see\n[Ultra-wide band communication](https://developer.android.com/guide/topics/connectivity/uwb).\n\nVerification\n------------\n\nTo verify your implementation of UWB, ensure that your device passes the CTS\ntests located under `/cts/tests/uwb`."]]