Go to console

FirebaseVisionBarcode

public class FirebaseVisionBarcode extends Object

Represents a single recognized barcode and its value.

The barcode's raw, unmodified, and uninterpreted content is returned in the getRawValue() field, while the barcode type (i.e. its encoding) can be found in the getFormat() field.

Nested Class Summary

class FirebaseVisionBarcode.Address An address. 
@interface FirebaseVisionBarcode.BarcodeFormat Barcode format constants - enumeration of supported barcode formats. 
@interface FirebaseVisionBarcode.BarcodeValueType Barcode value type constants - enumeration of supported barcode content value types

Supported types include:

  1. TYPE_UNKNOWN
  2. TYPE_CONTACT_INFO
  3. TYPE_EMAIL
  4. TYPE_ISBN
  5. TYPE_PHONE
  6. TYPE_PRODUCT
  7. TYPE_SMS
  8. TYPE_TEXT
  9. TYPE_URL
  10. TYPE_WIFI
  11. TYPE_GEO
  12. TYPE_CALENDAR_EVENT
  13. TYPE_DRIVER_LICENSE
 
class FirebaseVisionBarcode.CalendarDateTime DateTime data type used in calendar events. 
class FirebaseVisionBarcode.CalendarEvent A calendar event extracted from QRCode. 
class FirebaseVisionBarcode.ContactInfo A person's or organization's business card. 
class FirebaseVisionBarcode.DriverLicense A driver license or ID card. 
class FirebaseVisionBarcode.Email An email message from a 'MAILTO:' or similar QRCode type. 
class FirebaseVisionBarcode.GeoPoint GPS coordinates from a 'GEO:' or similar QRCode type. 
class FirebaseVisionBarcode.PersonName A person's name, both formatted version and individual name components. 
class FirebaseVisionBarcode.Phone Phone number info. 
class FirebaseVisionBarcode.Sms An sms message from an 'SMS:' or similar QRCode type. 
class FirebaseVisionBarcode.UrlBookmark A URL and title from a 'MEBKM:' or similar QRCode type. 
class FirebaseVisionBarcode.WiFi A wifi network parameters from a 'WIFI:' or similar QRCode type. 

Constant Summary

int FORMAT_ALL_FORMATS Barcode format constant representing the union of all supported formats.
int FORMAT_AZTEC Barcode format constant for AZTEC.
int FORMAT_CODABAR Barcode format constant for Codabar.
int FORMAT_CODE_128 Barcode format constant for Code 128.
int FORMAT_CODE_39 Barcode format constant for Code 39.
int FORMAT_CODE_93 Barcode format constant for Code 93.
int FORMAT_DATA_MATRIX Barcode format constant for Data Matrix.
int FORMAT_EAN_13 Barcode format constant for EAN-13.
int FORMAT_EAN_8 Barcode format constant for EAN-8.
int FORMAT_ITF Barcode format constant for ITF (Interleaved Two-of-Five).
int FORMAT_PDF417 Barcode format constant for PDF-417.
int FORMAT_QR_CODE Barcode format constant for QR Code.
int FORMAT_UNKNOWN Barcode format unknown to the current SDK, but understood by Google Play services.
int FORMAT_UPC_A Barcode format constant for UPC-A.
int FORMAT_UPC_E Barcode format constant for UPC-E.
int TYPE_CALENDAR_EVENT Barcode value type constant for calendar events.
int TYPE_CONTACT_INFO Barcode value type constant for contact information.
int TYPE_DRIVER_LICENSE Barcode value type constant for driver's license data.
int TYPE_EMAIL Barcode value type constant for email message details.
int TYPE_GEO Barcode value type constant for geographic coordinates.
int TYPE_ISBN Barcode value type constant for ISBNs.
int TYPE_PHONE Barcode value type constant for phone numbers.
int TYPE_PRODUCT Barcode value type constant for product codes.
int TYPE_SMS Barcode value type constant for SMS details.
int TYPE_TEXT Barcode value type constant for plain text.
int TYPE_UNKNOWN Barcode value type unknown, which indicates the current version of SDK cannot recognize the structure of the barcode.
int TYPE_URL Barcode value type constant for URLs/bookmarks.
int TYPE_WIFI Barcode value type constant for WiFi access point details.

Public Method Summary

Rect
getBoundingBox()
Gets the bounding rectangle of the detected barcode.
FirebaseVisionBarcode.CalendarEvent
getCalendarEvent()
Gets parsed calendar event details (set iff getValueType() is TYPE_CALENDAR_EVENT).
FirebaseVisionBarcode.ContactInfo
getContactInfo()
Gets parsed contact details (set iff getValueType() is TYPE_CONTACT_INFO).
Point[]
getCornerPoints()
Returns four corner points in clockwise direction starting with top-left.
String
getDisplayValue()
Returns barcode value in a user-friendly format.
FirebaseVisionBarcode.DriverLicense
getDriverLicense()
Gets parsed driver's license details (set iff getValueType() is TYPE_DRIVER_LICENSE).
FirebaseVisionBarcode.Email
getEmail()
Gets parsed email details (set iff getValueType() is TYPE_EMAIL).
int
getFormat()
Returns barcode format, for example FORMAT_EAN_13.
FirebaseVisionBarcode.GeoPoint
getGeoPoint()
Gets parsed geo coordinates (set iff getValueType() is TYPE_GEO).
FirebaseVisionBarcode.Phone
getPhone()
Gets parsed phone details (set iff getValueType() is TYPE_PHONE).
String
getRawValue()
Returns barcode value as it was encoded in the barcode.
FirebaseVisionBarcode.Sms
getSms()
Gets parsed SMS details (set iff getValueType() is TYPE_SMS).
FirebaseVisionBarcode.UrlBookmark
getUrl()
Gets parsed URL bookmark details (set iff getValueType() is TYPE_URL).
int
getValueType()
Returns format type of the barcode value.
FirebaseVisionBarcode.WiFi
getWifi()
Gets parsed WiFi AP details (set iff getValueType() is TYPE_WIFI).

Inherited Method Summary

Constants

public static final int FORMAT_ALL_FORMATS

Barcode format constant representing the union of all supported formats. Pass into setBarcodeFormats(int, int...) to select formats to recognize. This is also the default setting.

Constant Value: 0

public static final int FORMAT_AZTEC

Barcode format constant for AZTEC.

Pass into