हमारा सुझाव है कि 27 मार्च, 2025 से AOSP को बनाने और उसमें योगदान देने के लिए, aosp-main
के बजाय android-latest-release
का इस्तेमाल करें. ज़्यादा जानकारी के लिए, AOSP में हुए बदलाव लेख पढ़ें.
हैप्टिक फ़ीचर लागू करना
संग्रह की मदद से व्यवस्थित रहें
अपनी प्राथमिकताओं के आधार पर, कॉन्टेंट को सेव करें और कैटगरी में बांटें.
आम तौर पर, डिवाइस बनाने वाली कंपनियों को हर डिवाइस के लिए बनाई गई निजी एसेट का मालिकाना हक माना जाता है. इसलिए, उनकी इंजीनियरिंग की कोशिशें अक्सर हर डिवाइस के हिसाब से होती हैं. इकोसिस्टम में मौजूद अन्य डिवाइसों के लिए, बहुत कम या कोई भी कोशिश नहीं की जाती.
इसके उलट, डेवलपर ऐसे ऐप्लिकेशन बनाने की कोशिश करते हैं जो नेटवर्क के सभी Android फ़ोन पर काम करते हों. भले ही, हर डिवाइस की तकनीकी जानकारी अलग-अलग हो.
अलग-अलग तरीकों से काम करने की वजह से, फ़्रैगमेंटेशन की समस्या हो सकती है. उदाहरण के लिए, कुछ फ़ोन की हार्डवेयर क्षमताएं, ऐप्लिकेशन डेवलपर की उम्मीदों के मुताबिक नहीं होती हैं. इसलिए, अगर haptics API कुछ Android फ़ोन पर काम करते हैं, लेकिन कुछ पर नहीं, तो इससे एक जैसा नेटवर्क नहीं बन पाता. इसलिए, हार्डवेयर कॉन्फ़िगरेशन की अहम भूमिका यह पक्का करना है कि मैन्युफ़ैक्चरर, हर डिवाइस पर Android के haptics API लागू कर सकें.
इस पेज पर, हार्डवेयर के लिए ज़रूरी शर्तों को सेट अप करने के लिए, सिलसिलेवार चेकलिस्ट दी गई है. इससे, Android के haptics API का बेहतर तरीके से इस्तेमाल किया जा सकता है.
इस इमेज में, डिवाइस बनाने वाली कंपनियों और डेवलपर के बीच सामान्य जानकारी बनाने के बारे में बताया गया है. यह एक बेहतर इकोसिस्टम बनाने के लिए ज़रूरी है:
पहली इमेज. डिवाइस बनाने वाली कंपनियों और डेवलपर के बीच जानकारी शेयर करना
हैप्टिक्स की सुविधा को लागू करने के लिए चेकलिस्ट
कॉन्सटेंट लागू करना
- हैप्टिक्स लागू करने के लिए, कॉन्स्टेंट की सूची.
प्राइमिटिव लागू करना
- एचएएल कंपोज़िशन प्राइमिटिव को लागू करने के लिए दिशा-निर्देश.
HAL और एपीआई के बीच कॉन्स्टेंट मैप करना
- सार्वजनिक एपीआई कॉन्स्टेंट (फ़्रेमवर्क में प्लेसहोल्डर के तौर पर नामित) और एचएएल कॉन्स्टेंट के बीच मैपिंग के सुझाव, जो प्लेसहोल्डर लागू करते हैं.
- इस प्रोसेस के बारे में ज़्यादा जानने के लिए, सुझाई गई मैपिंग के लिए डिज़ाइन के सिद्धांत देखें.
पार्ट-वाइज़ लीनियर एनवलप (पीडब्ल्यूएलई) इफ़ेक्ट लागू करना
- ऐम्प्ल्यट्यूड और फ़्रीक्वेंसी एन्वलप को लागू करने के लिए दिशा-निर्देश.
हार्डवेयर का आकलन करना
- टारगेट किए गए हैप्टिक इफ़ेक्ट के बारे में निर्देश. अपने हार्डवेयर की तुरंत जांच करने के लिए, इन निर्देशों का पालन करें.
इस पेज पर मौजूद कॉन्टेंट और कोड सैंपल कॉन्टेंट के लाइसेंस में बताए गए लाइसेंस के हिसाब से हैं. 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,["# 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)."]]