Android 7.1 के सैंपल
संग्रह की मदद से व्यवस्थित रहें
अपनी प्राथमिकताओं के आधार पर, कॉन्टेंट को सेव करें और कैटगरी में बांटें.
यहां दिए गए कोड सैंपल, Android 7.1 (एपीआई 25) के लिए दिए गए हैं. Android Studio में सैंपल डाउनलोड करने के लिए, फ़ाइल > नया > सैंपल इंपोर्ट करें मेन्यू विकल्प चुनें.
ध्यान दें: डाउनलोड किए जा सकने वाले ये प्रोजेक्ट, Gradle और Android Studio के साथ इस्तेमाल करने के लिए डिज़ाइन किए गए हैं.
ऐप्लिकेशन शॉर्टकट का सैंपल
इस सैंपल में, Android 7.1 (एपीआई लेवल 25) में पेश किए गए ऐप्लिकेशन शॉर्टकट API का इस्तेमाल करने का तरीका बताया गया है. इस एपीआई की मदद से, ऐप्लिकेशन में ऐसे कई इंटेंट तय किए जा सकते हैं जो उपयोगकर्ता के ऐप्लिकेशन के लॉन्चर आइकॉन को दबाकर रखने पर दिखते हैं. यहां एक्सएमएल में स्टैटिक तौर पर और रनटाइम के दौरान डाइनैमिक तौर पर, दोनों तरह से लिंक रजिस्टर करने के उदाहरण दिए गए हैं.
ऐप्लिकेशन के शॉर्टकट का सैंपल
इमेज कीबोर्ड ऐप्लिकेशन का सैंपल
इस सैंपल में, Android Support Library का इस्तेमाल करके,
Commit Content API को लागू करने का तरीका बताया गया है.
यह एपीआई, आईएमई के लिए एक ऐसा यूनिवर्सल तरीका उपलब्ध कराता है जिससे इमेज और अन्य रिच कॉन्टेंट को सीधे किसी ऐप्लिकेशन के टेक्स्ट एडिटर में भेजा जा सकता है. इससे उपयोगकर्ता, पसंद के मुताबिक ईमोजी, स्टिकर या अन्य ऐप्लिकेशन से मिले रिच कॉन्टेंट का इस्तेमाल करके कॉन्टेंट लिख सकते हैं.
इमेज कीबोर्ड ऐप्लिकेशन का सैंपल
इमेज कीबोर्ड IME का सैंपल
इस सैंपल में,
Commit Content API और Android Support Library का इस्तेमाल करके, पसंद के मुताबिक इमेज वाला कीबोर्ड बनाने का तरीका बताया गया है.
यह कीबोर्ड, काम करने वाले ऐप्लिकेशन में दिखेगा. साथ ही, इसमें Commit Content API का भी इस्तेमाल किया जाएगा. इससे उपयोगकर्ता, टेक्स्ट एडिटर में इमोजी, स्टिकर या अन्य रिच कॉन्टेंट डाल पाएंगे.
इमेज कीबोर्ड IME का सैंपल
इस पेज पर मौजूद कॉन्टेंट और कोड सैंपल कॉन्टेंट के लाइसेंस में बताए गए लाइसेंस के हिसाब से हैं. 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,["# Android 7.1 Samples\n\nThe following code samples are provided for Android 7.1 (API 25). To\ndownload the samples in Android Studio, select the **File \\\u003e New \\\u003e Import Sample** menu\noption.\n\n\n**Note:** These downloadable projects are designed\nfor use with Gradle and Android Studio.\n\n### App shortcuts sample\n\n\nThis sample demonstrates how to use the [app shortcuts API](/guide/topics/ui/shortcuts)\nintroduced in Android 7.1 (API level 25). This API allows an application to define a set of\nintents which are displayed when a user long-presses on the app's launcher icon. Examples are\ngiven for registering links both statically in XML, as well as dynamically at runtime.\n\n\n[App shortcuts sample](https://github.com/android/user-interface-samples/tree/main/AppShortcuts)\n\n### Image keyboard app sample\n\n\nThis sample demonstrates how to implement the [Commit Content API](/reference/android/view/inputmethod/InputConnection#commitContent(android.view.inputmethod.InputContentInfo,%20int,%20android.os.Bundle)), using the [Android Support Library](/topic/libraries/support-library).\nThis API provides a universal way for IMEs to send images and other rich\ncontent directly to a text editor in an app, allowing users to compose\ncontent using custom emojis, stickers, or other rich content provided by\nother applications.\n\n\n[Image keyboard app sample](https://github.com/android/input-samples/tree/main/CommitContentSampleApp)\n\n### Image keyboard IME sample\n\n\nThis sample demonstrates how to write a [custom image keyboard](/preview/image-keyboard) using the [Commit Content API](/reference/android/view/inputmethod/InputConnection#commitContent(android.view.inputmethod.InputContentInfo,%20int,%20android.os.Bundle)) and the [Android Support Library](/topic/libraries/support-library).\nThis keyboard will be displayed inside compatible apps (also using the Commit\nContent API), allowing users to insert emojis, stickers, or other rich\ncontent into text editors.\n\n\n[Image keyboard IME sample](https://github.com/android/input-samples/tree/main/CommitContentSampleIME)"]]