自 2025 年 3 月 27 日起,我們建議您使用 android-latest-release
而非 aosp-main
建構及貢獻 AOSP。詳情請參閱「Android 開放原始碼計畫變更」。
觸覺回饋
透過集合功能整理內容
你可以依據偏好儲存及分類內容。
Android 觸覺回饋子系統是指透過觸覺感官刺激產生效果的硬體和軟體功能。建立觸覺效果需要高度依賴硬體,而感知觸覺刺激則需要高度依賴使用者依附元件和偏好設定。這項二分法讓裝置製造商在 Android 生態系統中開發並充分發揮觸覺回饋的使用者優勢。
如要正確實作觸覺效果,必須使用最新的相容硬體。為了讓使用者正確感知觸覺刺激,您必須調整特定偏好設定,才能產生所需效果。製造商必須滿足這兩項要求,才能在 Android 上正確實作觸覺回饋。
以下指南說明裝置製造商和應用程式開發人員的遵循規範,並提供 Android 觸覺回饋 API 的最佳使用方式:
如要進一步瞭解一般相容性,請參閱 Android 相容性定義文件。
如要進一步瞭解如何在 Android 中使用觸覺回饋,請參閱 Android 開發人員說明文件。
這個頁面中的內容和程式碼範例均受《內容授權》中的授權所規範。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,["# Haptics\n\nThe Android haptics subsystem refers to hardware and software features that\ncontribute to the creation of stimuli through the sense of touch. *Creating*\nhaptic effects requires a high degree of hardware dependencies, while\n*perceiving* haptic stimuli requires a high degree of user dependencies and\npreferences. This dichotomy challenges device manufacturers to develop and\nmaximize haptic user benefits in the Android ecosystem.\n\nImplementing haptic effects correctly requires up-to-date, compatible hardware.\nFor users to properly perceive haptic stimuli, specific preferences must be\ntweaked to create the desired effects. Manufacturers must satisfy both\nrequirements to properly implement haptics on Android.\n\nThe following guides describe the compliance instructions for device\nmanufacturers and app developers, and provides clear guidance on the best use\nof the Android haptics APIs:\n\n- [**A step-by-step checklist detailing haptic SW and HW compliance**](/docs/core/interaction/haptics/haptics-implement)\n\n The checklist walks\n you through the key elements of the hardware configuration process.\n- [**A foundation for haptic framework**](/docs/core/interaction/haptics/haptics-ux-foundation)\n\n This lists the set of UX principles that Android haptic improvements are\n driven by.\n- [**An in-depth look at UX and design principles**](/docs/core/interaction/haptics/haptics-ux-design)\n\n These principles illustrate the importance of hardware compliance in\n improving the haptics UX for Android end users.\n- [**Assess hardware**](/docs/core/interaction/haptics/hardware)\n\n Learn how to assess the haptic effects implementation with the necessary\n test equipment and apply your findings to the performance map to draw\n conclusions about the performance of your device under test.\n\nTo learn more about compatibility in general, read the [Android\nCompatibility Definition Document](/docs/compatibility/11/android-11-cdd).\n\nTo learn more about using haptics in Android, read the [Android\nDeveloper Documentation](https://developer.android.com/develop/ui/views/haptics)."]]