自 2025 年 3 月 27 日起,我们建议您使用 android-latest-release
而非 aosp-main
构建 AOSP 并为其做出贡献。如需了解详情,请参阅 AOSP 的变更。
触感反馈
使用集合让一切井井有条
根据您的偏好保存内容并对其进行分类。
Android 触感反馈子系统是指有助于通过触觉产生刺激的硬件和软件功能。打造触感效果需要大量硬件依赖项,而感知触感刺激则需要大量用户依赖项及其偏好设置。这种差异促使设备制造商在 Android 生态系统中打造用户在触感方面的体验并最大限度地发挥这一优势。
若要正确实现触感反馈效果,需使用最新的兼容硬件。为了让用户正确感知触感刺激,必须调整特定偏好设置以产生所需的效果。制造商必须满足这两项要求,才能在 Android 上正确实现触感反馈。
以下指南介绍了面向设备制造商和应用开发者的合规性说明,还提供了有关如何充分利用 Android 触感反馈 API 的明确指导:
如需详细了解一般兼容性,请参阅 Android 兼容性定义文档。
如需详细了解如何在 Android 中使用触感反馈,请参阅 Android 开发者文档。
本页面上的内容和代码示例受内容许可部分所述许可的限制。Java 和 OpenJDK 是 Oracle 和/或其关联公司的注册商标。
最后更新时间 (UTC):2025-03-26。
[[["易于理解","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"]],["最后更新时间 (UTC):2025-03-26。"],[],[],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)."]]