Mit Sammlungen den Überblick behalten
Sie können Inhalte basierend auf Ihren Einstellungen speichern und kategorisieren.
Barcode-Scan
plat_iosplat_android
Mit der Barcode Scan API von ML Kit können Sie Daten lesen, die mit den meisten
Standard-Barcode-Formaten. Der Barcode wird auf dem Gerät gescannt.
Netzwerkverbindung erforderlich.
Barcodes sind eine bequeme Möglichkeit, Informationen aus der realen Welt an Ihr
Insbesondere bei der Verwendung von 2D-Formaten wie QR-Code können Sie
Strukturierte Daten wie Kontaktdaten oder Anmeldedaten für WLAN-Netzwerke. Weil
ML Kit kann diese Daten automatisch erkennen und parsen, Ihre App kann darauf reagieren
wenn Nutzende einen Barcode scannen.
Sie können nach allen unterstützten Barcodeformaten gleichzeitig suchen, ohne das gewünschte Format angeben zu müssen. Sie können auch die Scangeschwindigkeit erhöhen, indem Sie
Detektor nur auf die Formate ab, an denen Sie interessiert sind.
Extrahiert strukturierte Daten
Strukturierte Daten, die in einem der unterstützten 2D-Formate gespeichert sind, sind
automatisch geparst. Zu den unterstützten Informationstypen gehören URLs,
Kontaktdaten, Kalendertermine, E-Mail-Adressen, Telefonnummer
Nummern, Aufforderungen zu SMS-Nachrichten, ISBNs, Informationen zur WLAN-Verbindung,
den geografischen Standort und AAMVA-Standard-Fahrerinformationen.
Funktioniert in jeder Ausrichtung
Barcodes werden unabhängig von ihrer Ausrichtung erkannt und gescannt: aufrecht, auf dem Kopf oder seitlich.
Wird auf dem Gerät ausgeführt
Das Barcode-Scannen erfolgt vollständig auf dem Gerät und erfordert keine Netzwerkverbindung.
[null,null,["Zuletzt aktualisiert: 2025-07-25 (UTC)."],[],[],null,["Barcode Scanning \nplat_ios plat_android \n\nWith 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\n[iOS](/docs/ml-kit/ios/read-barcodes)\n[Android](/docs/ml-kit/android/read-barcodes)\n\nIf you're a Flutter developer, you might be interested in\n[FlutterFire](https://github.com/FirebaseExtended/flutterfire/tree/master/packages/firebase_ml_vision),\nwhich includes a plugin for Firebase's ML Vision APIs.\n| This is a beta release of ML Kit for Firebase. This API might be changed in backward-incompatible ways and is not subject to any SLA or deprecation policy.\n\nKey capabilities\n\n|-----------------------------|-----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------|\n| Reads most standard formats | - Linear formats: Codabar, Code 39, Code 93, Code 128, EAN-8, EAN-13, ITF, UPC-A, UPC-E - 2D formats: Aztec, Data Matrix, PDF417, QR Code |\n| Automatic format detection | Scan for all supported barcode formats at once, without having to specify the format you're looking for. Or, boost scanning speed by restricting the detector to only the formats you're interested in. |\n| Extracts structured data | Structured data stored using one of the supported 2D formats are automatically parsed. Supported information types include URLs, contact information, calendar events, email addresses, phone numbers, SMS message prompts, ISBNs, WiFi connection information, geographic location, and AAMVA-standard driver information. |\n| Works with any orientation | Barcodes are recognized and scanned regardless of their orientation: right-side-up, upside-down, or sideways. |\n| Runs on the device | Barcode scanning is performed completely on the device, and doesn't require a network connection. |\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 | | |"]]