Captured ID

Defined in package com.scandit.datacapture.id.data

CapturedId
class CapturedId

Added in version 6.5.0

A class that represents a result of a document scan. This class contains the captured information that is commonly present in all the documents, like the name or the date of birth of the holder.

The class can be cast to a concrete implementation using capturedResultType.

fromJson(jsonData)
static @NonNull CapturedId fromJson(@NonNull String jsonData)

Added in version 6.12.0

Creates a captured id from the passed JSON string.

firstName
@Nullable String getFirstName()

Added in version 6.5.0

The first name of the document holder. Separated by spaces if more than one name is present. Characters can be all uppercase for document types which don’t capitalize names (for example names encoded in ICAO Machine Readable Zones).

lastName
@Nullable String getLastName()

Added in version 6.5.0

The last name of the document holder. Separated by spaces if more than one name is present. Characters can be all uppercase for document types which don’t capitalize names (for example names encoded in ICAO Machine Readable Zones).

fullName
@NonNull String getFullName()

Added in version 6.5.0

The full name of the document holder. Characters can be all uppercase for document types which don’t capitalize names (for example names encoded in ICAO Machine Readable Zones).

sex
@Nullable String getSex()

Added in version 6.5.0

The sex of the document holder.

dateOfBirth
@Nullable DateResult getDateOfBirth()

Added in version 6.5.0

The date of birth of the document holder. If the document doesn’t provide two first digits of the year then the date of birth is always set to be earlier than or equal to the scan date. For example if the year of scanning is 2021 and the document returns that the year of birth is 14 then the returned year is set to 2014. However if the document returns that the year of birth is 24 then the returned year is set to 1924.

age
@Nullable Integer getAge()

Added in version 6.16.0

The age of the document holder. Calculated as the difference in full years between the birth date and the current local date. If null is returned it means that the full birth date is not available. The returned value depends on the device date. The same document may result in different values for devices with different dates (e.g. in different time zones, or with a date set manually by the user).

nationality
@Nullable String getNationality()

Added in version 6.5.0

The nationality of the document holder represented by a three-letter code (Alpha-3 codes specified in ISO 3166-1).

address
@Nullable String getAddress()

Added in version 6.5.0

The address of the document holder.

capturedResultType
CapturedResultType getCapturedResultType()

Added in version 6.5.0

The captured result type. Consult the documentation for more information about it.

Deprecated since version 6.11: Replaced by capturedResultTypes.

capturedResultTypes
@NonNull EnumSet<CapturedResultType> getCapturedResultTypes()

Added in version 6.11.0

The captured result types. Guaranteed to contain at least one element. Consult the documentation for more information about it.

documentType
DocumentType getDocumentType()

Added in version 6.5.0

The document type. Consult the documentation for more information about it.

issuingCountryIso
@Nullable String getIssuingCountryIso()

Added in version 6.5.0

The ISO (Alpha-3 code) abbreviation of the issuing country of the document.

issuingCountry
@Nullable String getIssuingCountry()

Added in version 6.5.0

A human readable text identifying the country that issues the document.

documentNumber
@Nullable String getDocumentNumber()

Added in version 6.5.0

The document number.

If IdCaptureSettings.anonymizationMode is enabled for the field results, the returned value might be null for certain documents.

documentAdditionalNumber
@Nullable String getDocumentAdditionalNumber()

Added in version 6.19.0

If IdCaptureSettings.anonymizationMode is enabled for the field results, the returned value might be null for certain documents.

If IdCaptureSettings.anonymizationMode is enabled for the field results, the returned value might be null for certain documents.

dateOfExpiry
@Nullable DateResult getDateOfExpiry()

Added in version 6.5.0

The date of expiry of the document.

isExpired
@Nullable Boolean isExpired()

Added in version 6.16.0

Whether this document is expired. Calculated by comparing the document’s expiration date with the current local date. true if the document is expired and false if it’s not expired, or if it never expires. null is returned if the value of this property could not be determined - for example if the date of expiry is not present, or if the date of expiry couldn’t be captured. Please note that the system time is used for computation of this field so users of the device are capable of changing the result of the field by changing the system time.

dateOfIssue
@Nullable DateResult getDateOfIssue()

Added in version 6.5.0

The date of issue of the document. Please note that some documents may specify the exact date of issue, while other the month and the year only.

aamvaBarcode
@Nullable AamvaBarcodeResult getAamvaBarcode()

Added in version 6.6.0

The additional information extracted from a barcode on a document that follows the American Association of Motor Vehicle Administrators (AAMVA) specification. This property is guaranteed to be non-null when capturedResultType is CapturedResultType.AAMVA_BARCODE_RESULT, and is null otherwise.

colombiaDlBarcode
@Nullable ColombiaDlBarcodeResult getColombiaDlBarcode()

Added in version 6.13.0

The additional information extracted from a barcode on a Colombia Driver’s License (Licencia de Conducción). This property is guaranteed to be non-null when capturedResultTypes is CapturedResultType.COLOMBIA_DL_BARCODE_RESULT, and is null otherwise.

colombiaIdBarcode
@Nullable ColombiaIdBarcodeResult getColombiaIdBarcode()

Added in version 6.8.0

The additional information extracted from a barcode on a Colombia ID (Cédula de Ciudadanía). This property is guaranteed to be non-null when capturedResultType is CapturedResultType.COLOMBIA_ID_BARCODE_RESULT, and is null otherwise.

argentinaIdBarcode
@Nullable ArgentinaIdBarcodeResult getArgentinaIdBarcode()

Added in version 6.8.0

The additional information extracted from a barcode on a Argentina ID (Documento Nacional de Identidad). This property is guaranteed to be non-null when capturedResultType is CapturedResultType.ARGENTINA_ID_BARCODE_RESULT, and is null otherwise.

southAfricaDlBarcode
@Nullable SouthAfricaDlBarcodeResult getSouthAfricaDlBarcode()

Added in version 6.8.0

The additional information extracted from a barcode on a South Africa Driver’s License. This property is guaranteed to be non-null when capturedResultType is CapturedResultType.SOUTH_AFRICA_DL_BARCODE_RESULT, and is null otherwise.

southAfricaIdBarcode
@Nullable SouthAfricaIdBarcodeResult getSouthAfricaIdBarcode()

Added in version 6.8.0

The additional information extracted from a barcode on a South Africa identity card (Smart ID Card). This property is guaranteed to be non-null when capturedResultType is CapturedResultType.SOUTH_AFRICA_ID_BARCODE_RESULT, and is null otherwise.

commonAccessCardBarcode
@Nullable CommonAccessCardBarcodeResult getCommonAccessCardBarcode()

Added in version 6.18.0

mrz
@Nullable MrzResult getMrz()

Added in version 6.6.0

The additional information extracted from the Machine Readable Zone (MRZ) of a Machine Readable Travel Document (MRTD). This property is guaranteed to be non-null when capturedResultType is CapturedResultType.MRZ_RESULT, and is null otherwise.

usUniformedServicesBarcode
@Nullable UsUniformedServicesBarcodeResult getUsUniformedServicesBarcode()

Added in version 6.6.0

The additional information extracted from a barcode on a United States Uniformed Services Identification card. This property is guaranteed to be non-null when capturedResultType is CapturedResultType.US_UNIFORMED_SERVICES_BARCODE_RESULT, and is null otherwise.

viz
@Nullable VizResult getViz()

Added in version 6.6.0

The additional information extracted from a documents or its part intended to be read by humans (for example Visual Inspection Zone (VIZ) of a Machine-Readable Travel Document (MRTD)). This property is guaranteed to be non-null when capturedResultType is CapturedResultType.VIZ_RESULT, and is null otherwise.

chinaMainlandTravelPermitMrz
@Nullable ChinaMainlandTravelPermitMrzResult getChinaMainlandTravelPermitMrz()

Added in version 6.14.0

The additional information extracted from a barcode on a China Mainland Travel Permit. This property is guaranteed to be non-null when capturedResultTypes is CapturedResultType.CHINA_MAINLAND_TRAVEL_PERMIT_MRZ_RESULT, and is null otherwise.

chinaExitEntryPermitMrz
@Nullable ChinaExitEntryPermitMrzResult getChinaExitEntryPermitMrz()

Added in version 6.14.0

The additional information extracted from the Machine Readable Zone (MRZ) present on an Exit-Entry Permit for Travelling to and from Hong Kong and Macau (往来港澳通行证) or an Exit-Entry Permit for Travelling to and from Taiwan (往来台灣通行证) issued by People’s Republic of China. This property is guaranteed to be non-null when capturedResultTypes is CapturedResultType.CHINA_MAINLAND_TRAVEL_PERMIT_MRZ_RESULT, and is null otherwise.

chinaOneWayPermitBackMrz
@Nullable ChinaOneWayPermitBackMrzResult getChinaOneWayPermitBackMrz()

Added in version 6.16.0

The additional information extracted from the Machine Readable Zone (MRZ) present on the back of a One-Way Permit to Hong Kong/Macau issued by People’s Republic of China. This property is guaranteed to be non-null when capturedResultTypes is CapturedResultType.CHINA_ONE_WAY_PERMIT_BACK_MRZ_RESULT, and is null otherwise.

chinaOneWayPermitFrontMrz
@Nullable ChinaOneWayPermitFrontMrzResult getChinaOneWayPermitFrontMrz()

Added in version 6.16.0

The additional information extracted from the Machine Readable Zone (MRZ) present on the front of a One-Way Permit to Hong Kong/Macau issued by People’s Republic of China. This property is guaranteed to be non-null when capturedResultTypes is CapturedResultType.CHINA_ONE_WAY_PERMIT_FRONT_MRZ_RESULT, and is null otherwise.

apecBusinessTravelCardMrz
@Nullable ApecBusinessTravelCardMrzResult getApecBusinessTravelCardMrz()

Added in version 6.16.0

The additional information extracted from the Machine Readable Zone (MRZ) present on the back of an APEC (Asia-Pacific Economic Cooperation) Business Travel Card. This property is guaranteed to be non-null when capturedResultTypes is CapturedResultType.APEC_BUSINESS_TRAVEL_CARD_MRZ_RESULT, and is null otherwise.

usVisaViz
@Nullable UsVisaVizResult getUsVisaViz()

Added in version 6.18.0

The additional information extracted from the US Visa. This property is guaranteed to be non-null when capturedResultTypes is CapturedResultType.US_VISA_VIZ_RESULT, and is null otherwise.

getImageBitmapForType(type)
Bitmap getImageBitmapForType(
        IdImageType type)

Added in version 6.5.0

Gets a bitmap for an image type.

toJson()
@NonNull String toJson()

Added in version 6.6.0

Returns the JSON representation of the captured id.

equals(other)
boolean equals(@Nullable Object other)

Added in version 6.6.0

Indicates whether some other object is equal to this one.

hashCode()
int hashCode()

Added in version 6.6.0

Returns a hash code value for the object.