बारकोड स्कैन करना
संग्रह की मदद से व्यवस्थित रहें
अपनी प्राथमिकताओं के आधार पर, कॉन्टेंट को सेव करें और कैटगरी में बांटें.

ML Kit के बारकोड स्कैनिंग एपीआई की मदद से, सबसे स्टैंडर्ड बारकोड फ़ॉर्मैट का इस्तेमाल करके,
कोड में बदला गया डेटा पढ़ा जा सकता है. बारकोड स्कैनिंग डिवाइस पर होती है और इसके लिए नेटवर्क कनेक्शन की ज़रूरत नहीं होती.
बारकोड असल दुनिया से आपके ऐप्लिकेशन तक जानकारी भेजने का
एक आसान तरीका है. खास तौर पर, क्यूआर कोड जैसे 2D फ़ॉर्मैट का इस्तेमाल करते समय, संपर्क जानकारी या वाई-फ़ाई नेटवर्क क्रेडेंशियल जैसे स्ट्रक्चर्ड डेटा को कोड में बदला जा सकता है. एमएल किट, इस डेटा को अपने-आप पहचान कर पार्स कर सकता है. इसलिए, जब कोई उपयोगकर्ता बारकोड को स्कैन करता है, तब आपका ऐप्लिकेशन आसानी से जवाब दे सकता है.
जिन उपयोगकर्ताओं को कस्टम यूज़र इंटरफ़ेस (यूआई) की ज़रूरत नहीं है उन्हें हम Google कोड स्कैनर का इस्तेमाल करने का सुझाव देते हैं. कोड स्कैन करने वाला एपीआई, स्टैंडर्ड बारकोड स्कैनिंग एपीआई के जैसा ही अनुमान मॉडल इस्तेमाल करता है. हालांकि, तेज़ और एक जैसा अनुभव देने के लिए, सिर्फ़ सबसे सेंट्रलाइज़्ड बारकोड दिखाता है. Google कोड स्कैनर भी ज़्यादा सुरक्षित है और इसे ऐक्सेस करने की अनुमति नहीं है. साथ ही, इसके लिए कैमरे से जुड़ी जानकारी लागू करने या अनुमतियों की ज़रूरत नहीं होती.
iOS
Android
Google कोड स्कैनर
मुख्य सुविधाएं
- ज़्यादातर स्टैंडर्ड फ़ॉर्मैट का इस्तेमाल करता है
- लीनियर फ़ॉर्मैट: Codabar, कोड 39, कोड 93, कोड 128, EAN-8, EAN-13, ITF, UPC-A, UPC-E
- 2D फ़ॉर्मैट: Aztec, Data Matrix, PDF417, क्यूआर कोड
- फ़ॉर्मैट का अपने-आप पता लगाने की सुविधा
- अपनी पसंद का फ़ॉर्मैट बताए बिना या डिटेक्टर को सिर्फ़ अपनी पसंद के फ़ॉर्मैट तक सीमित करके, स्कैन करने की स्पीड को बढ़ाएं. इसके लिए, आपको एक साथ सभी बारकोड फ़ॉर्मैट को स्कैन करना होगा.
- स्ट्रक्चर्ड डेटा एक्सट्रैक्ट करता है
- काम करने वाले किसी 2D फ़ॉर्मैट का इस्तेमाल करके सेव किया गया स्ट्रक्चर्ड डेटा अपने-आप पार्स हो जाता है. इस तरह की जानकारी में यूआरएल, संपर्क जानकारी, कैलेंडर इवेंट, ईमेल पते, फ़ोन नंबर, एसएमएस मैसेज प्रॉम्प्ट, ISBNs, वाई-फ़ाई कनेक्शन की जानकारी, भौगोलिक जगह, और AAMVA के स्टैंडर्ड ड्राइवर की जानकारी शामिल है.
- किसी भी ओरिएंटेशन के साथ काम करता है
- बारकोड की पहचान और उन्हें स्कैन किया जाता है, भले ही उनका ओरिएंटेशन कोई भी हो: दाएं साइड-अप, उलटा या तिरछा.
- डिवाइस पर चलता है
- बारकोड स्कैन करने की प्रोसेस, डिवाइस पर पूरी तरह से की जाती है. इसके लिए, इंटरनेट की ज़रूरत नहीं होती.
ध्यान दें कि यह एपीआई इन फ़ॉर्म में बारकोड की पहचान नहीं करता:
- सिर्फ़ एक वर्ण वाले 1D बारकोड
- ITF फ़ॉर्मैट में बने बारकोड में छह से कम वर्ण होते हैं. साथ ही, चेकसम न होने की वजह से, इस फ़ॉर्मैट को अस्थिर माना जाता है
- FNC2, FNC3 या FNC4 के साथ एन्कोड किए गए बारकोड
- ईसीआई मोड में जनरेट हुए क्यूआर कोड
यह एपीआई हर एपीआई कॉल के लिए, 10 से ज़्यादा बारकोड की पहचान नहीं करता.
परिणामों के उदाहरण
|
नतीजा |
कॉर्नर |
(49,125), (1,72,125), (1,72,160), (49,160) |
रॉ वैल्यू |
2404105001722 |
|
|
नतीजा |
कॉर्नर |
(87,87) (6,12,87) (6,12,612) (87,612) |
रॉ वैल्यू |
WIFI:S:SB1Guest;P:12345;T:WEP;; |
वाई-फ़ाई की जानकारी |
SSID |
SB1Guest |
पासवर्ड |
12345 |
स्ट्रीम किस तरह की है |
WEP |
|
|
जब तक कुछ अलग से न बताया जाए, तब तक इस पेज की सामग्री को Creative Commons Attribution 4.0 License के तहत और कोड के नमूनों को Apache 2.0 License के तहत लाइसेंस मिला है. ज़्यादा जानकारी के लिए, Google Developers साइट नीतियां देखें. Oracle और/या इससे जुड़ी हुई कंपनियों का, Java एक रजिस्टर किया हुआ ट्रेडमार्क है.
आखिरी बार 2025-08-17 (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-08-17 (UTC) को अपडेट किया गया."],[[["\u003cp\u003eML Kit's Barcode Scanning API reads data from most standard barcode formats, including linear and 2D formats, without needing an internet connection.\u003c/p\u003e\n"],["\u003cp\u003eIt automatically detects and parses structured data like contact info, WiFi credentials, and more from supported 2D formats, enabling intelligent app responses.\u003c/p\u003e\n"],["\u003cp\u003eThe API works offline, recognizing barcodes in any orientation, and the Google Code Scanner offers a faster, safer, and permissionless option for basic scanning needs.\u003c/p\u003e\n"],["\u003cp\u003eWhile it supports a wide range of formats and data types, the API has limitations regarding certain 1D barcodes, ITF formats, and QR codes with specific encodings, recognizing a maximum of 10 barcodes per call.\u003c/p\u003e\n"]]],["ML Kit's barcode scanning API reads data from most standard barcode formats on the device without needing a network connection. It automatically detects and parses structured data from 2D formats like QR codes, recognizing information such as URLs, contact details, and WiFi credentials. The API supports various linear and 2D formats, works with any barcode orientation, and offers a Google code scanner option for a faster, safer, permission-less experience. It does not recognize some formats including some 1D and ITF barcodes.\n"],null,["With ML Kit's barcode scanning API, you can read data encoded using most\nstandard barcode formats. Barcode scanning happens on the device, and doesn't\nrequire a network connection.\n\nBarcodes are a convenient way to pass information from the real world to your\napp. In particular, when using 2D formats such as QR code, you can encode\nstructured data such as contact information or WiFi network credentials. Because\nML Kit can automatically recognize and parse this data, your app can respond\nintelligently when a user scans a barcode.\n\nFor users who don't require custom UI, we recommend using the\n[Google code scanner](/ml-kit/vision/barcode-scanning/code-scanner). The code\nscanner API uses the same inference model as the standard Barcode scanning API,\nbut returns only the most centralized barcode for a faster and more consistent\nexperience. Google code scanner is also safer and permission-less, and does not\nrequire camera-related implementation or permissions.\n\n[iOS](/ml-kit/vision/barcode-scanning/ios)\n[Android](/ml-kit/vision/barcode-scanning/android)\n[Google code scanner](/ml-kit/vision/barcode-scanning/code-scanner)\n\nKey capabilities\n\nReads most standard formats\n:\n - Linear formats: Codabar, Code 39, Code 93, Code 128, EAN-8, EAN-13, ITF, UPC-A, UPC-E\n - 2D formats: Aztec, Data Matrix, PDF417, QR Code\n\nAutomatic format detection\n: Scan for all supported barcode formats at once without having to specify\n the format you're looking for, or boost scanning speed by restricting the\n detector to only the formats you're interested in.\n\nExtracts structured data\n: Structured data that's stored using one of the supported 2D formats is\n automatically parsed. Supported information types include URLs,\n contact information, calendar events, email addresses, phone\n numbers, SMS message prompts, ISBNs, WiFi connection information,\n geographic location, and AAMVA-standard driver information.\n\nWorks with any orientation\n: Barcodes are recognized and scanned regardless of their orientation:\n right-side-up, upside-down, or sideways.\n\nRuns on the device\n: Barcode scanning is performed completely on the device, and doesn't\n require a network connection.\n\nNote that this API does not recognize barcodes in these forms:\n\n- 1D Barcodes with only one character\n- Barcodes in ITF format with fewer than six characters, and this format is known to be flaky due to absence of checksum\n- Barcodes encoded with FNC2, FNC3 or FNC4\n- QR codes generated in the ECI mode\n\nThis API recognizes no more than 10 barcodes per API call.\n\nExample results\n\n|---|-----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------|\n| | | Result || |---------------|------------------------------------------| | **Corners** | (49,125), (172,125), (172,160), (49,160) | | **Raw value** | 2404105001722 | |\n\n|---|------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------|\n| | | Result || |----------------------|-----------------------------------------------------------------------------------------------------------------| | **Corners** | (87,87) (612,87) (612,612) (87,612) | | **Raw value** | `WIFI:S:SB1Guest;P:12345;T:WEP;;` | | **WiFi information** | |--------------|----------| | **SSID** | SB1Guest | | **Password** | 12345 | | **Type** | WEP | | |"]]