Barcode.DriverLicense
Stay organized with collections
Save and categorize content based on your preferences.
A driver license or ID card.
Inherited Method Summary
From class java.lang.Object
Object
|
clone()
|
boolean |
|
void |
finalize()
|
final Class<?>
|
getClass()
|
int |
hashCode()
|
final void |
notify()
|
final void |
notifyAll()
|
String
|
toString()
|
final void |
wait(long arg0, int arg1)
|
final void |
wait(long arg0)
|
final void |
wait()
|
Public Methods
public String getAddressCity ()
Gets city of holder's address.
Returns null
if not available.
public String getAddressState ()
Gets state of holder's address.
Returns null
if not available.
public String getAddressStreet ()
Gets holder's street address.
Returns null
if not available.
public String getAddressZip ()
Gets postal code of holder's address.
Returns null
if not available.
public String getBirthDate ()
Gets birth date of the holder.
Returns null
if not available.
public String getDocumentType ()
Gets "DL" for driver licenses, "ID" for ID cards.
Returns null
if not available.
public String getExpiryDate ()
Gets expiry date of the license.
Returns null
if not available.
public String getFirstName ()
Gets holder's first name.
Returns null
if not available.
public String getGender ()
Gets holder's gender. 1 - male, 2 - female.
Returns null
if not available.
public String getIssueDate ()
Gets issue date of the license.
The date format depends on the issuing country. MMDDYYYY for the US, YYYYMMDD for
Canada.
Returns null
if not available.
public String getIssuingCountry ()
public String getLastName ()
Gets holder's last name.
Returns null
if not available.
public String getLicenseNumber ()
Gets driver license ID number.
Returns null
if not available.
public String getMiddleName ()
Gets holder's middle name.
Returns null
if not available.
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-10-31 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-10-31 UTC."],[[["\u003cp\u003e\u003ccode\u003eBarcode.DriverLicense\u003c/code\u003e provides structured data extracted from driver licenses and ID cards scanned by ML Kit.\u003c/p\u003e\n"],["\u003cp\u003eIt includes personal information like first name, last name, birth date, gender, and address.\u003c/p\u003e\n"],["\u003cp\u003eLicense-specific details such as license number, issue and expiry dates, document type, and issuing country are also available.\u003c/p\u003e\n"],["\u003cp\u003eAll data fields are accessed through public "get" methods, which return a string value or \u003ccode\u003enull\u003c/code\u003e if the information is not found.\u003c/p\u003e\n"],["\u003cp\u003eDate formats for issue and expiry dates vary depending on the issuing country (e.g., MMDDYYYY for the US, YYYYMMDD for Canada).\u003c/p\u003e\n"]]],[],null,["# Barcode.DriverLicense\n\npublic static class **Barcode.DriverLicense** extends [Object](//developer.android.com/reference/java/lang/Object.html) \nA driver license or ID card. \n\n### Public Method Summary\n\n|-------------------------------------------------------------------|----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------|\n| [String](//developer.android.com/reference/java/lang/String.html) | [getAddressCity](/android/reference/com/google/mlkit/vision/barcode/common/Barcode.DriverLicense#getAddressCity())() Gets city of holder's address. |\n| [String](//developer.android.com/reference/java/lang/String.html) | [getAddressState](/android/reference/com/google/mlkit/vision/barcode/common/Barcode.DriverLicense#getAddressState())() Gets state of holder's address. |\n| [String](//developer.android.com/reference/java/lang/String.html) | [getAddressStreet](/android/reference/com/google/mlkit/vision/barcode/common/Barcode.DriverLicense#getAddressStreet())() Gets holder's street address. |\n| [String](//developer.android.com/reference/java/lang/String.html) | [getAddressZip](/android/reference/com/google/mlkit/vision/barcode/common/Barcode.DriverLicense#getAddressZip())() Gets postal code of holder's address. |\n| [String](//developer.android.com/reference/java/lang/String.html) | [getBirthDate](/android/reference/com/google/mlkit/vision/barcode/common/Barcode.DriverLicense#getBirthDate())() Gets birth date of the holder. |\n| [String](//developer.android.com/reference/java/lang/String.html) | [getDocumentType](/android/reference/com/google/mlkit/vision/barcode/common/Barcode.DriverLicense#getDocumentType())() Gets \"DL\" for driver licenses, \"ID\" for ID cards. |\n| [String](//developer.android.com/reference/java/lang/String.html) | [getExpiryDate](/android/reference/com/google/mlkit/vision/barcode/common/Barcode.DriverLicense#getExpiryDate())() Gets expiry date of the license. |\n| [String](//developer.android.com/reference/java/lang/String.html) | [getFirstName](/android/reference/com/google/mlkit/vision/barcode/common/Barcode.DriverLicense#getFirstName())() Gets holder's first name. |\n| [String](//developer.android.com/reference/java/lang/String.html) | [getGender](/android/reference/com/google/mlkit/vision/barcode/common/Barcode.DriverLicense#getGender())() Gets holder's gender. |\n| [String](//developer.android.com/reference/java/lang/String.html) | [getIssueDate](/android/reference/com/google/mlkit/vision/barcode/common/Barcode.DriverLicense#getIssueDate())() Gets issue date of the license. |\n| [String](//developer.android.com/reference/java/lang/String.html) | [getIssuingCountry](/android/reference/com/google/mlkit/vision/barcode/common/Barcode.DriverLicense#getIssuingCountry())() Gets the [three-letter country code](//en.wikipedia.org/wiki/ISO_3166-1_alpha-3) in which DL/ID was issued. |\n| [String](//developer.android.com/reference/java/lang/String.html) | [getLastName](/android/reference/com/google/mlkit/vision/barcode/common/Barcode.DriverLicense#getLastName())() Gets holder's last name. |\n| [String](//developer.android.com/reference/java/lang/String.html) | [getLicenseNumber](/android/reference/com/google/mlkit/vision/barcode/common/Barcode.DriverLicense#getLicenseNumber())() Gets driver license ID number. |\n| [String](//developer.android.com/reference/java/lang/String.html) | [getMiddleName](/android/reference/com/google/mlkit/vision/barcode/common/Barcode.DriverLicense#getMiddleName())() Gets holder's middle name. |\n\n### Inherited Method Summary\n\nFrom class java.lang.Object \n\n|----------------------------------------------------------------------------|--------------------------------------------------------------------------------|\n| [Object](//developer.android.com/reference/java/lang/Object.html) | clone() |\n| boolean | equals([Object](//developer.android.com/reference/java/lang/Object.html) arg0) |\n| void | finalize() |\n| final [Class](//developer.android.com/reference/java/lang/Class.html)\\\u003c?\\\u003e | getClass() |\n| int | hashCode() |\n| final void | notify() |\n| final void | notifyAll() |\n| [String](//developer.android.com/reference/java/lang/String.html) | toString() |\n| final void | wait(long arg0, int arg1) |\n| final void | wait(long arg0) |\n| final void | wait() |\n\nPublic Methods\n--------------\n\n#### public [String](//developer.android.com/reference/java/lang/String.html) **getAddressCity** ()\n\nGets city of holder's address.\n\nReturns `null` if not available. \n\n#### public [String](//developer.android.com/reference/java/lang/String.html) **getAddressState** ()\n\nGets state of holder's address.\n\nReturns `null` if not available. \n\n#### public [String](//developer.android.com/reference/java/lang/String.html) **getAddressStreet** ()\n\nGets holder's street address.\n\nReturns `null` if not available. \n\n#### public [String](//developer.android.com/reference/java/lang/String.html) **getAddressZip** ()\n\nGets postal code of holder's address.\n\nReturns `null` if not available. \n\n#### public [String](//developer.android.com/reference/java/lang/String.html) **getBirthDate** ()\n\nGets birth date of the holder.\n\nReturns `null` if not available. \n\n#### public [String](//developer.android.com/reference/java/lang/String.html) **getDocumentType** ()\n\nGets \"DL\" for driver licenses, \"ID\" for ID cards.\n\nReturns `null` if not available. \n\n#### public [String](//developer.android.com/reference/java/lang/String.html) **getExpiryDate** ()\n\nGets expiry date of the license.\n\nReturns `null` if not available. \n\n#### public [String](//developer.android.com/reference/java/lang/String.html) **getFirstName** ()\n\nGets holder's first name.\n\nReturns `null` if not available. \n\n#### public [String](//developer.android.com/reference/java/lang/String.html) **getGender** ()\n\nGets holder's gender. 1 - male, 2 - female.\n\nReturns `null` if not available. \n\n#### public [String](//developer.android.com/reference/java/lang/String.html) **getIssueDate** ()\n\nGets issue date of the license.\n\nThe date format depends on the issuing country. MMDDYYYY for the US, YYYYMMDD for\nCanada.\n\nReturns `null` if not available. \n\n#### public [String](//developer.android.com/reference/java/lang/String.html) **getIssuingCountry** ()\n\nGets the [three-letter country\ncode](//en.wikipedia.org/wiki/ISO_3166-1_alpha-3) in which DL/ID was issued.\n\nReturns `null` if not available. \n\n#### public [String](//developer.android.com/reference/java/lang/String.html) **getLastName** ()\n\nGets holder's last name.\n\nReturns `null` if not available. \n\n#### public [String](//developer.android.com/reference/java/lang/String.html) **getLicenseNumber** ()\n\nGets driver license ID number.\n\nReturns `null` if not available. \n\n#### public [String](//developer.android.com/reference/java/lang/String.html) **getMiddleName** ()\n\nGets holder's middle name.\n\nReturns `null` if not available."]]