MLKitBarcodeScanning Framework Reference
Stay organized with collections
Save and categorize content based on your preferences.
Constants
The following constants are available globally.
-
Unknown Barcode value types.
-
Barcode value type for contact info.
-
Barcode value type for email addresses.
-
Barcode value type for ISBNs.
-
Barcode value type for phone numbers.
-
Barcode value type for product codes.
-
Barcode value type for SMS details.
-
Barcode value type for plain text.
-
Barcode value type for URLs/bookmarks.
-
Barcode value type for Wi-Fi access point details.
-
Barcode value type for geographic coordinates.
-
Barcode value type for calendar events.
-
Barcode value type for driver’s license data.
-
Barcode unknown address type.
-
Barcode work address type.
-
Barcode home address type.
-
-
-
-
-
-
-
-
Barcode mobile phone type.
-
Barcode unknown Wi-Fi encryption type.
-
Barcode open Wi-Fi encryption type.
-
Barcode WPA Wi-Fi encryption type.
-
Barcode WEP Wi-Fi encryption type.
Except as otherwise noted, the content of this page is licensed under the Creative Commons Attribution 4.0 License
, and code samples are licensed under the Apache 2.0 License
. For details, see the Google Developers Site Policies
. Java is a registered trademark of Oracle and/or its affiliates.
Last updated 2024-07-10 UTC.
[[["Easy to understand","easyToUnderstand","thumb-up"],["Solved my problem","solvedMyProblem","thumb-up"],["Other","otherUp","thumb-up"]],[["Missing the information I need","missingTheInformationINeed","thumb-down"],["Too complicated / too many steps","tooComplicatedTooManySteps","thumb-down"],["Out of date","outOfDate","thumb-down"],["Samples / code issue","samplesCodeIssue","thumb-down"],["Other","otherDown","thumb-down"]],["Last updated 2024-07-10 UTC."],[[["\u003cp\u003eThis documentation details globally available constants used for barcode scanning with ML Kit.\u003c/p\u003e\n"],["\u003cp\u003eConstants define barcode value types, like URLs, emails, and contact info, for interpreting scanned data.\u003c/p\u003e\n"],["\u003cp\u003eAdditional constants categorize address, email, and phone types within barcode data (e.g., work, home).\u003c/p\u003e\n"],["\u003cp\u003eWi-Fi encryption types (open, WPA, WEP) are also represented by constants for scanned Wi-Fi barcodes.\u003c/p\u003e\n"],["\u003cp\u003eThese constants, declared in Swift, help developers handle and process various barcode information types.\u003c/p\u003e\n"]]],[],null,["# MLKitBarcodeScanning Framework Reference\n\nConstants\n=========\n\nThe following constants are available globally.\n- `\n ``\n ``\n `\n\n ### [unknown](#/c:MLKBarcode.h@MLKBarcodeValueTypeUnknown)\n\n `\n ` \n Unknown Barcode value types. \n\n #### Declaration\n\n Swift \n\n static let unknown: /ml-kit/reference/swift/mlkitbarcodescanning/api/reference/Type-Definitions#/c:MLKBarcode.h@T@MLKBarcodeValueType\n\n- `\n ``\n ``\n `\n\n ### [contactInfo](#/c:MLKBarcode.h@MLKBarcodeValueTypeContactInfo)\n\n `\n ` \n Barcode value type for contact info. \n\n #### Declaration\n\n Swift \n\n static let contactInfo: /ml-kit/reference/swift/mlkitbarcodescanning/api/reference/Type-Definitions#/c:MLKBarcode.h@T@MLKBarcodeValueType\n\n- `\n ``\n ``\n `\n\n ### [email](#/c:MLKBarcode.h@MLKBarcodeValueTypeEmail)\n\n `\n ` \n Barcode value type for email addresses. \n\n #### Declaration\n\n Swift \n\n static let email: /ml-kit/reference/swift/mlkitbarcodescanning/api/reference/Type-Definitions#/c:MLKBarcode.h@T@MLKBarcodeValueType\n\n- `\n ``\n ``\n `\n\n ### [ISBN](#/c:MLKBarcode.h@MLKBarcodeValueTypeISBN)\n\n `\n ` \n Barcode value type for ISBNs. \n\n #### Declaration\n\n Swift \n\n static let ISBN: /ml-kit/reference/swift/mlkitbarcodescanning/api/reference/Type-Definitions#/c:MLKBarcode.h@T@MLKBarcodeValueType\n\n- `\n ``\n ``\n `\n\n ### [phone](#/c:MLKBarcode.h@MLKBarcodeValueTypePhone)\n\n `\n ` \n Barcode value type for phone numbers. \n\n #### Declaration\n\n Swift \n\n static let phone: /ml-kit/reference/swift/mlkitbarcodescanning/api/reference/Type-Definitions#/c:MLKBarcode.h@T@MLKBarcodeValueType\n\n- `\n ``\n ``\n `\n\n ### [product](#/c:MLKBarcode.h@MLKBarcodeValueTypeProduct)\n\n `\n ` \n Barcode value type for product codes. \n\n #### Declaration\n\n Swift \n\n static let product: /ml-kit/reference/swift/mlkitbarcodescanning/api/reference/Type-Definitions#/c:MLKBarcode.h@T@MLKBarcodeValueType\n\n- `\n ``\n ``\n `\n\n ### [SMS](#/c:MLKBarcode.h@MLKBarcodeValueTypeSMS)\n\n `\n ` \n Barcode value type for SMS details. \n\n #### Declaration\n\n Swift \n\n static let SMS: /ml-kit/reference/swift/mlkitbarcodescanning/api/reference/Type-Definitions#/c:MLKBarcode.h@T@MLKBarcodeValueType\n\n- `\n ``\n ``\n `\n\n ### [text](#/c:MLKBarcode.h@MLKBarcodeValueTypeText)\n\n `\n ` \n Barcode value type for plain text. \n\n #### Declaration\n\n Swift \n\n static let text: /ml-kit/reference/swift/mlkitbarcodescanning/api/reference/Type-Definitions#/c:MLKBarcode.h@T@MLKBarcodeValueType\n\n- `\n ``\n ``\n `\n\n ### [URL](#/c:MLKBarcode.h@MLKBarcodeValueTypeURL)\n\n `\n ` \n Barcode value type for URLs/bookmarks. \n\n #### Declaration\n\n Swift \n\n static let URL: /ml-kit/reference/swift/mlkitbarcodescanning/api/reference/Type-Definitions#/c:MLKBarcode.h@T@MLKBarcodeValueType\n\n- `\n ``\n ``\n `\n\n ### [wiFi](#/c:MLKBarcode.h@MLKBarcodeValueTypeWiFi)\n\n `\n ` \n Barcode value type for Wi-Fi access point details. \n\n #### Declaration\n\n Swift \n\n static let wiFi: /ml-kit/reference/swift/mlkitbarcodescanning/api/reference/Type-Definitions#/c:MLKBarcode.h@T@MLKBarcodeValueType\n\n- `\n ``\n ``\n `\n\n ### [geographicCoordinates](#/c:MLKBarcode.h@MLKBarcodeValueTypeGeographicCoordinates)\n\n `\n ` \n Barcode value type for geographic coordinates. \n\n #### Declaration\n\n Swift \n\n static let geographicCoordinates: /ml-kit/reference/swift/mlkitbarcodescanning/api/reference/Type-Definitions#/c:MLKBarcode.h@T@MLKBarcodeValueType\n\n- `\n ``\n ``\n `\n\n ### [calendarEvent](#/c:MLKBarcode.h@MLKBarcodeValueTypeCalendarEvent)\n\n `\n ` \n Barcode value type for calendar events. \n\n #### Declaration\n\n Swift \n\n static let calendarEvent: /ml-kit/reference/swift/mlkitbarcodescanning/api/reference/Type-Definitions#/c:MLKBarcode.h@T@MLKBarcodeValueType\n\n- `\n ``\n ``\n `\n\n ### [driversLicense](#/c:MLKBarcode.h@MLKBarcodeValueTypeDriversLicense)\n\n `\n ` \n Barcode value type for driver's license data. \n\n #### Declaration\n\n Swift \n\n static let driversLicense: /ml-kit/reference/swift/mlkitbarcodescanning/api/reference/Type-Definitions#/c:MLKBarcode.h@T@MLKBarcodeValueType\n\n- `\n ``\n ``\n `\n\n ### [unknown](#/c:MLKBarcode.h@MLKBarcodeAddressTypeUnknown)\n\n `\n ` \n Barcode unknown address type. \n\n #### Declaration\n\n Swift \n\n static let unknown: /ml-kit/reference/swift/mlkitbarcodescanning/api/reference/Type-Definitions#/c:MLKBarcode.h@T@MLKBarcodeAddressType\n\n- `\n ``\n ``\n `\n\n ### [work](#/c:MLKBarcode.h@MLKBarcodeAddressTypeWork)\n\n `\n ` \n Barcode work address type. \n\n #### Declaration\n\n Swift \n\n static let work: /ml-kit/reference/swift/mlkitbarcodescanning/api/reference/Type-Definitions#/c:MLKBarcode.h@T@MLKBarcodeAddressType\n\n- `\n ``\n ``\n `\n\n ### [home](#/c:MLKBarcode.h@MLKBarcodeAddressTypeHome)\n\n `\n ` \n Barcode home address type. \n\n #### Declaration\n\n Swift \n\n static let home: /ml-kit/reference/swift/mlkitbarcodescanning/api/reference/Type-Definitions#/c:MLKBarcode.h@T@MLKBarcodeAddressType\n\n- `\n ``\n ``\n `\n\n ### [unknown](#/c:MLKBarcode.h@MLKBarcodeEmailTypeUnknown)\n\n `\n ` \n Unknown email type. \n\n #### Declaration\n\n Swift \n\n static let unknown: /ml-kit/reference/swift/mlkitbarcodescanning/api/reference/Type-Definitions#/c:MLKBarcode.h@T@MLKBarcodeEmailType\n\n- `\n ``\n ``\n `\n\n ### [work](#/c:MLKBarcode.h@MLKBarcodeEmailTypeWork)\n\n `\n ` \n Barcode work email type. \n\n #### Declaration\n\n Swift \n\n static let work: /ml-kit/reference/swift/mlkitbarcodescanning/api/reference/Type-Definitions#/c:MLKBarcode.h@T@MLKBarcodeEmailType\n\n- `\n ``\n ``\n `\n\n ### [home](#/c:MLKBarcode.h@MLKBarcodeEmailTypeHome)\n\n `\n ` \n Barcode home email type. \n\n #### Declaration\n\n Swift \n\n static let home: /ml-kit/reference/swift/mlkitbarcodescanning/api/reference/Type-Definitions#/c:MLKBarcode.h@T@MLKBarcodeEmailType\n\n- `\n ``\n ``\n `\n\n ### [unknown](#/c:MLKBarcode.h@MLKBarcodePhoneTypeUnknown)\n\n `\n ` \n Unknown phone type. \n\n #### Declaration\n\n Swift \n\n static let unknown: /ml-kit/reference/swift/mlkitbarcodescanning/api/reference/Type-Definitions#/c:MLKBarcode.h@T@MLKBarcodePhoneType\n\n- `\n ``\n ``\n `\n\n ### [work](#/c:MLKBarcode.h@MLKBarcodePhoneTypeWork)\n\n `\n ` \n Barcode work phone type. \n\n #### Declaration\n\n Swift \n\n static let work: /ml-kit/reference/swift/mlkitbarcodescanning/api/reference/Type-Definitions#/c:MLKBarcode.h@T@MLKBarcodePhoneType\n\n- `\n ``\n ``\n `\n\n ### [home](#/c:MLKBarcode.h@MLKBarcodePhoneTypeHome)\n\n `\n ` \n Barcode home phone type. \n\n #### Declaration\n\n Swift \n\n static let home: /ml-kit/reference/swift/mlkitbarcodescanning/api/reference/Type-Definitions#/c:MLKBarcode.h@T@MLKBarcodePhoneType\n\n- `\n ``\n ``\n `\n\n ### [fax](#/c:MLKBarcode.h@MLKBarcodePhoneTypeFax)\n\n `\n ` \n Barcode fax phone type. \n\n #### Declaration\n\n Swift \n\n static let fax: /ml-kit/reference/swift/mlkitbarcodescanning/api/reference/Type-Definitions#/c:MLKBarcode.h@T@MLKBarcodePhoneType\n\n- `\n ``\n ``\n `\n\n ### [mobile](#/c:MLKBarcode.h@MLKBarcodePhoneTypeMobile)\n\n `\n ` \n Barcode mobile phone type. \n\n #### Declaration\n\n Swift \n\n static let mobile: /ml-kit/reference/swift/mlkitbarcodescanning/api/reference/Type-Definitions#/c:MLKBarcode.h@T@MLKBarcodePhoneType\n\n- `\n ``\n ``\n `\n\n ### [unknown](#/c:MLKBarcode.h@MLKBarcodeWiFiEncryptionTypeUnknown)\n\n `\n ` \n Barcode unknown Wi-Fi encryption type. \n\n #### Declaration\n\n Swift \n\n static let unknown: /ml-kit/reference/swift/mlkitbarcodescanning/api/reference/Type-Definitions#/c:MLKBarcode.h@T@MLKBarcodeWiFiEncryptionType\n\n- `\n ``\n ``\n `\n\n ### [open](#/c:MLKBarcode.h@MLKBarcodeWiFiEncryptionTypeOpen)\n\n `\n ` \n Barcode open Wi-Fi encryption type. \n\n #### Declaration\n\n Swift \n\n static let open: /ml-kit/reference/swift/mlkitbarcodescanning/api/reference/Type-Definitions#/c:MLKBarcode.h@T@MLKBarcodeWiFiEncryptionType\n\n- `\n ``\n ``\n `\n\n ### [WPA](#/c:MLKBarcode.h@MLKBarcodeWiFiEncryptionTypeWPA)\n\n `\n ` \n Barcode WPA Wi-Fi encryption type. \n\n #### Declaration\n\n Swift \n\n static let WPA: /ml-kit/reference/swift/mlkitbarcodescanning/api/reference/Type-Definitions#/c:MLKBarcode.h@T@MLKBarcodeWiFiEncryptionType\n\n- `\n ``\n ``\n `\n\n ### [WEP](#/c:MLKBarcode.h@MLKBarcodeWiFiEncryptionTypeWEP)\n\n `\n ` \n Barcode WEP Wi-Fi encryption type. \n\n #### Declaration\n\n Swift \n\n static let WEP: /ml-kit/reference/swift/mlkitbarcodescanning/api/reference/Type-Definitions#/c:MLKBarcode.h@T@MLKBarcodeWiFiEncryptionType"]]