ตั้งแต่วันที่ 27 มีนาคม 2025 เป็นต้นไป เราขอแนะนำให้ใช้ android-latest-release
แทน aosp-main
เพื่อสร้างและมีส่วนร่วมใน AOSP โปรดดูข้อมูลเพิ่มเติมที่หัวข้อการเปลี่ยนแปลงใน AOSP
ประเมินฮาร์ดแวร์
จัดทุกอย่างให้เป็นระเบียบอยู่เสมอด้วยคอลเล็กชัน
บันทึกและจัดหมวดหมู่เนื้อหาตามค่ากำหนดของคุณ
การประเมินฮาร์ดแวร์เกี่ยวข้องกับการกำหนดเอฟเฟกต์การสัมผัส 3 รายการที่มีป้ายกำกับว่าเอฟเฟกต์ 1, 2 และ 3 สำหรับการประเมินนี้โดยเฉพาะ
ผลลัพธ์ที่ 1: ผลลัพธ์ของการสัมผัสแบบสั้นที่กำหนดไว้ล่วงหน้า
ที่คงที่ของ VibrationEffect.EFFECT_CLICK
คือผลฐานหรือตัวหารร่วมในการแมป HAL-API ที่ระบุไว้ในแมปค่าคงที่ระหว่าง HAL กับ API ซึ่งจับคู่กับเอฟเฟกต์ที่ใช้มากที่สุดอย่าง HapticFeedbackConstants.KEYBOARD_PRESS
การประเมินเอฟเฟกต์นี้จะช่วยระบุความพร้อมของอุปกรณ์เป้าหมายสำหรับการสัมผัสที่ชัดเจน
ผลลัพธ์ที่ 2: ผลลัพธ์การสัมผัสที่กำหนดเองสั้นๆ
ที่คงที่
VibrationEffect.createOneShot(20,255)
มีไว้สำหรับเอฟเฟกต์การสัมผัสที่กําหนดเอง สําหรับแรงกระตุ้นที่กําหนดเองแบบสั้นๆ รายการเดียว เราขอแนะนําให้ใช้เกณฑ์สูงสุด 20 มิลลิวินาทีเพื่อกําหนดระยะเวลา เราไม่แนะนำให้ใช้พัลส์เดียวที่ยาวกว่า 20 ms เนื่องจากผู้ใช้จะรับรู้ว่าเป็นการสั่น
รูปที่ 19 ผลลัพธ์การสัมผัสที่กำหนดเองสั้นๆ
เอฟเฟกต์ที่ 3: เอฟเฟกต์การสัมผัสที่ผู้ใช้กำหนดเองแบบยาวที่มีการเปลี่ยนแปลงความกว้างของคลื่น
ค่าคงที่ VibrationEffect.createWaveform(timings[], amplitudes[], int
repeat)
มีไว้สำหรับเอฟเฟกต์ที่กำหนดเองแบบยาวที่มีความผันผวนของแอมพลิจูด ความสามารถในการสร้างแอมพลิจูดที่หลากหลายสำหรับเอฟเฟกต์การสัมผัสที่กำหนดเองเป็นหนึ่งในตัวบ่งชี้ในการประเมินความสามารถของอุปกรณ์สำหรับการสัมผัสที่สมจริง timings []
และ amplitudes []
ที่แนะนําคือ {500, 500}
และ {128, 255}
ตามลําดับ ซึ่งแสดงแนวโน้มความกว้างของพัลส์ที่เพิ่มขึ้นจาก 50% เป็น 100% โดยมีอัตราการสุ่มตัวอย่าง 500 ms
รูปที่ 20 สัมผัสที่กำหนดเองแบบยาวที่มีการเปลี่ยนแปลงความกว้าง
หากต้องการตรวจสอบความสามารถของฮาร์ดแวร์ในการควบคุมระดับความดังสำหรับเอฟเฟกต์ 3 ให้ใช้วิธี Vibrator.hasAmplitudeControl()
ผลลัพธ์ต้องเป็น true
เพื่อดำเนินการ
VibrationEffect.createWaveform
โดยมีแอมพลิจูดที่เปลี่ยนแปลงตามที่ตั้งใจไว้
รูปที่ 21 การประเมินผลของผู้ใช้เกี่ยวกับเอฟเฟกต์การสัมผัส 1, 2 และ 3
ประเมินแบบอัตวิสัย
หากต้องการตรวจสอบความสอดคล้องอย่างรวดเร็ว ให้ทำการประเมินแบบอัตวิจาณก่อน เป้าหมายของการประเมินแบบอัตวิสัยคือการสังเกตแอมพลิจูดของเอฟเฟกต์การสัมผัสเพื่อพิจารณาว่าอุปกรณ์สามารถสร้างการสัมผัสที่มีแอมพลิจูดที่มนุษย์รับรู้ได้หรือไม่
คำถามที่เฉพาะเจาะจงซึ่งจัดโครงสร้างตามแนวคิดนี้มีลักษณะดังนี้ อุปกรณ์สร้างผลสัมผัสที่ผู้ใช้รับรู้ได้ตามที่คาดไว้ได้ไหม การตอบคำถามนี้จะช่วยให้คุณหลีกเลี่ยงการสัมผัสที่ไม่สำเร็จ ซึ่งรวมถึงการสัมผัสที่มองไม่เห็นซึ่งผู้ใช้ไม่รู้สึก หรือสัมผัสที่ไม่ได้ตั้งใจซึ่งรูปแบบคลื่นไม่ได้สร้างรูปแบบตามที่ตั้งใจไว้
เราขอแนะนําอย่างยิ่งให้ทําการประเมินคุณภาพขั้นสูง การประเมินคุณภาพขั้นสูงจะระบุแอตทริบิวต์ที่วัดผลได้ของเอฟเฟกต์การสัมผัสเพื่อใช้การสัมผัสที่มีคุณภาพ เมื่อดำเนินการเสร็จแล้ว ผู้ผลิตอุปกรณ์ควรจะสามารถวิเคราะห์สถานะการสัมผัสปัจจุบัน ซึ่งหมายความว่าสามารถตั้งเป้าหมายเพื่อปรับปรุงคุณภาพโดยรวมได้ ดูการประเมินฮาร์ดแวร์
ตัวอย่างเนื้อหาและโค้ดในหน้าเว็บนี้ขึ้นอยู่กับใบอนุญาตที่อธิบายไว้ในใบอนุญาตการใช้เนื้อหา Java และ OpenJDK เป็นเครื่องหมายการค้าหรือเครื่องหมายการค้าจดทะเบียนของ 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,["# Assess the hardware\n\nHardware assessment involves defining three haptic effects, labeled Effects 1,\n2, and 3 for this specific assessment.\n\nEffect 1: Predefined short haptic constants\n-------------------------------------------\n\nThe\n[`VibrationEffect.EFFECT_CLICK`](https://developer.android.com/reference/android/os/VibrationEffect.html#EFFECT_CLICK)\nconstant is the baseline effect or common denominator in the HAL-API mapping\nprovided in [Map constants between HAL and API](/docs/core/interaction/haptics/haptics-map-constants)\n. It's mapped with the most used effect, [`HapticFeedbackConstants.KEYBOARD_PRESS`](https://developer.android.com/reference/android/view/HapticFeedbackConstants#KEYBOARD_PRESS)\n. Assessing this effect helps determine the readiness of your target device for\n[*clear haptics*](/docs/core/interaction/haptics/haptics-ux-foundation#clear-haptics).\n\nEffect 2: Short custom haptic effect\n------------------------------------\n\nThe\n[`VibrationEffect.createOneShot(20,255)`](https://developer.android.com/reference/android/os/VibrationEffect#createOneShot(long,%20int))\nconstant is for custom haptic effects. For short, single custom impulses,\n20 ms is the recommended maximum threshold to define duration. A single\nimpulse longer than 20 ms isn't recommended because it's perceived as a\n[*buzzy\nvibration*](/docs/core/interaction/haptics/haptics-ux-foundation#buzzy-vibration).\n\n**Figure 19.** Short custom haptic effect\n\nEffect 3: Long custom haptic effect with amplitude variation\n------------------------------------------------------------\n\nThe [`VibrationEffect.createWaveform(timings[], amplitudes[], int\nrepeat)`](https://developer.android.com/reference/android/os/VibrationEffect#createWaveform(long%5B%5D,%20int%5B%5D,%20int))\nconstant is for long custom effects with amplitude variation. The ability to\nproduce varying amplitudes for custom haptic effects is one of the indicators to\nevaluate the device's capabilities for [*rich\nhaptics*](/docs/core/interaction/haptics/haptics-ux-foundation#ease-in). The\nrecommended `timings []` and `amplitudes []` are `{500, 500}` and `{128, 255}`,\nrespectively, which presents an increasing trend of amplitude from 50% to 100%,\nwith a 500 ms sampling rate.\n\n**Figure 20.** Long custom haptic effect with amplitude variation\n\nTo check the hardware capabilities of amplitude control for Effect 3, use the\n[`Vibrator.hasAmplitudeControl()`](https://developer.android.com/reference/android/os/Vibrator#hasAmplitudeControl())\nmethod. The result has to be `true` to execute\n[`VibrationEffect.createWaveform`](https://developer.android.com/reference/android/os/VibrationEffect#createWaveform(long%5B%5D,%20int%5B%5D,%20int))\nwith varying amplitude as intended.\n\n**Figure 21.** Subject assessment of haptic effect 1, 2, and 3\n\n### Perform a subjective assessment\n\nFor a quick coherence check, perform a subjective assessment first. The goal of\nthe subjective assessment is to observe the amplitude of the haptic effects to\ndetermine whether the device can generate haptics with human-perceptible\namplitudes.\n\nA specific question structured around this notion looks like this: *Can the\ndevice produce perceptible haptic effects to the users as expected?* Answering\nthis question helps you avoid *failed haptics*, including imperceptible haptics\nthat users can't feel, or unintended haptics where waveforms don't produce\npatterns as intended.\n\n### Perform an advanced assessment\n\nPerforming advanced quality assessments is highly recommended. Advanced quality\nassessments characterize quantifiable attributes of haptic effects to implement\n*quality haptics* . When finished, device manufacturers should be able to\ndiagnose the current haptic status, which means they can set goals to improve\nthe overall quality. See [Hardware\nassessment](/docs/core/interaction/haptics/hardware)."]]