2025년 3월 27일부터 AOSP를 빌드하고 기여하려면 aosp-main
대신 android-latest-release
를 사용하는 것이 좋습니다. 자세한 내용은 AOSP 변경사항을 참고하세요.
햅틱 구현
컬렉션을 사용해 정리하기
내 환경설정을 기준으로 콘텐츠를 저장하고 분류하세요.
일반적으로 기기 제조업체는 각 기기에 대해 생성된 비공개 애셋의 소유자로 간주됩니다. 따라서 기기 제조업체의 엔지니어링 작업은 흔히 기기별로 집중됩니다. 그리고 기기 제조업체는 생태계에 있는 다른 기기와의 일관성을 위해 거의 노력하지 않습니다.
이와는 대조적으로 개발자는 각 기기의 기술 사양과 관계없이 생태계의 모든 Android 휴대전화에서 작동하는 앱을 빌드하려고 노력합니다.
이러한 접근 방식의 차이로 인해 조각화 문제가 발생할 수 있습니다. 예를 들어 특정 휴대전화의 하드웨어 기능이 앱 개발자가 설정한 기대와 일치하지 않습니다. 따라서 햅틱 API가 일부 Android 휴대전화에서는 작동하지만 다른 휴대전화에서는 작동하지 않는다면 결과적으로 생태계가 일관되지 않게 됩니다. 이러한 이유로 제조업체가 모든 기기에 Android 햅틱 API를 구현할 수 있도록 하는 데 하드웨어 구성이 중요한 역할을 합니다.
이 페이지에서는 Android 햅틱 API를 최대한 활용할 수 있도록 하드웨어 규정 준수를 설정하는 단계별 체크리스트를 제공합니다.
다음 그림에서는 기기 제조업체와 개발자 간의 공통 지식 구축을 보여주는데, 이 단계는 일관성 있는 생태계를 만드는 데 매우 중요합니다.
그림 1. 기기 제조업체와 개발자 간의 지식 구축
햅틱 구현 체크리스트
상수 구현
원시 유형 구현
HAL과 API 간의 상수 매핑
- 프레임워크의 자리표시자라는 공개 API 상수와 자리표시자를 구현하는 HAL 상수 간의 매핑 권장사항입니다.
- 이 프로세스에 관해 자세히 알아보려면 권장 매핑을 안내하는 디자인 원칙을 참고하세요.
직선으로 이루어진 구간별 봉투 (PWLE) 효과 구현
하드웨어 평가
- 타겟 햅틱 효과에 관한 안내입니다. 이러한 안내에 따라 하드웨어에 관해 빠르게 확인할 수 있습니다.
이 페이지에 나와 있는 콘텐츠와 코드 샘플에는 콘텐츠 라이선스에서 설명하는 라이선스가 적용됩니다. 자바 및 OpenJDK는 Oracle 및 Oracle 계열사의 상표 또는 등록 상표입니다.
최종 업데이트: 2025-07-27(UTC)
[[["이해하기 쉬움","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(UTC)"],[],[],null,["# Implement haptics\n\nDevice manufacturers are generally considered the owners of the private assets\ncreated for each device. As such, their engineering efforts are often focused on\na *per-device basis*; little to no effort goes to the consistency of other\ndevices in the ecosystem.\n\nIn direct contrast, developers strive to build apps that work on *all* Android\nphones in the ecosystem, regardless of each device's technical specifications.\nThis difference in approach can cause a fragmentation problem, for example, the\nhardware capabilities of certain phones don't match expectations set by the app\ndevelopers. So if the haptics APIs work on some Android phones but not others,\nthe result is an inconsistent ecosystem. This is why hardware configuration\nplays a critical role in ensuring that manufacturers can implement Android\nhaptics APIs on *every* device.\n\nThis page provides a step-by-step checklist to set up hardware compliance for\nthe best use of the Android haptics APIs.\n\nThe following figure illustrates building common knowledge between device\nmanufacturers and developers, which is a critical step in creating a cohesive\necosystem:\n\n**Figure 1.** Building knowledge between device manufacturers and developers\n\nHaptics implementation checklist\n--------------------------------\n\n1. [Implement constants](/docs/core/interaction/haptics/haptics-constants-primitives#implement-constants)\n\n - List of constants to implement haptics.\n2. [Implement primitives](/docs/core/interaction/haptics/haptics-constants-primitives#implement-primitives)\n\n - Implementation guidance for HAL composition primitives.\n3. [Map constants between HAL and API](/docs/core/interaction/haptics/haptics-map-constants)\n\n - Mapping recommendations between public API constants (named *placeholders* in the framework) and HAL constants, which implement the placeholders.\n - See [Design principles to guide the recommended mapping](/docs/core/interaction/haptics/haptics-ux-design) to learn more about this process.\n4. [Implement piecewise linear envelope (PWLE) effects](/docs/core/interaction/haptics/haptics-pwle)\n\n - Implementation guidance for amplitude and frequency envelopes.\n5. [Assess the hardware](/docs/core/interaction/haptics/haptics-assess-hardware)\n\n - Instructions on target haptic effects. Use these instructions to perform quick checks on your hardware.\n\n| **Note:** You can learn more about building common knowledge between device manufacturers and developers in [Advanced Haptics: The When, What, and How of\n| Haptic APIs](https://www.youtube.com/watch?v=00jRoEFnpk8)."]]