ID Capture Settings

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

IdCaptureSettings
class IdCaptureSettings

Added in version 6.2.0

Settings to configure an IdCapture instance.

IdCaptureSettings()
IdCaptureSettings()

Added in version 6.2.0

Creates a new default settings. By default the scanner is an instance of SingleSideScanner that does not scan anything, and acceptedDocuments is empty.

getShouldPassImageTypeToResult(type)
boolean getShouldPassImageTypeToResult(IdImageType type)

Added in version 6.2.0

Gets whether an IdCapture created with these settings should extract an image (specified by the given type) from recognized documents and return it as part of CapturedId. Note that the image may still not be returned, for example, if it’s not present in a document or if it’s not recognized. Default is false.

setShouldPassImageTypeToResult(type, value)
void setShouldPassImageTypeToResult(IdImageType type,
        boolean value)

Added in version 6.2.0

Sets whether an IdCapture created with these settings should extract an image (specified by the given type) from recognized documents and return it as part of CapturedId. Note that the image may still not be returned, for example, if it’s not present in a document or if it’s not recognized. Default is false.

setProperty(key, value)
void setProperty(@NonNull String key,
        @NonNull Object value)

Added in version 6.2.0

Sets a property to the provided value. Use this method to set properties that are not yet part of a stable API. Properties set through this method may change in a future release.

getProperty(key)
@NonNull Object getProperty(@NonNull String key)

Added in version 6.2.0

Retrieves the value of a previously set property. In case the property does not exist, null is returned. Use this method to get properties that are not yet part of a stable API. These properties may change in a future release.

anonymizationMode
IdAnonymizationMode getAnonymizationMode()
void setAnonymizationMode(IdAnonymizationMode value)

Added in version 6.17.0

This setting allows to remove protected data from images and result fields of certain document types. Enabling anonymization helps to remain compliant with local legal requirements which restrict the collection of some data. Examples of affected fields are the document number on German IDs or the personal ID number on Dutch driver’s licenses. By default set to IdAnonymizationMode.FIELDS_ONLY.

addAnonymizedField(document, fieldType)
void addAnonymizedField(IdCaptureDocument document,
        IdFieldType fieldType)

Added in version 8.0.0

Adds a specific field to be anonymized for the specified document type and region. This method allows fine-grained control over which fields are anonymized, complementing the global anonymizationMode setting. Fields added through this method will be anonymized in addition to any default anonymization rules for the document type.

removeAnonymizedField(document, fieldType)
void removeAnonymizedField(IdCaptureDocument document,
        IdFieldType fieldType)

Added in version 8.0.0

Removes a previously added anonymized field for the specified document type and region. This method provides fine-grained control over anonymization settings, allowing dynamic adjustment of which fields should be anonymized. If the field was not previously added, this operation has no effect.

clearAnonymizedFields()
void clearAnonymizedFields()

Added in version 8.0.0

Removes all previously added anonymized fields from the settings.

scanner
@NonNull IdCaptureScanner getScanner()
void setScanner(@NonNull IdCaptureScanner value)

Added in version 7.0.0

Defines the scanner configuration for capturing identity documents, including physical documents and mobile documents.

acceptedDocuments
@NonNull List<@NonNull IdCaptureDocument> getAcceptedDocuments()
void setAcceptedDocuments(@NonNull List<@NonNull IdCaptureDocument> value)

Added in version 7.0.0

Documents that should be accepted by the ID Capture scanner. You may accept individual document categories (like ID cards or passports) globally or narrow the selection by region or country, offering granular control over the scanning configuration.

All documents not specified by this setting are rejected.

Refer to the Supported Documents section for the full list of document types and regions.

rejectedDocuments
@NonNull List<@NonNull IdCaptureDocument> getRejectedDocuments()
void setRejectedDocuments(@NonNull List<@NonNull IdCaptureDocument> value)

Added in version 7.0.0

Documents to reject during ID capture, even if they match types defined in “acceptedDocuments”. This property is useful for enforcing restrictions on documents from certain regions or countries.

Refer to the Supported Documents section for the full list of document types and regions.

rejectVoidedIds
boolean getRejectVoidedIds()
void setRejectVoidedIds(boolean value)

Added in version 6.24.0

This setting enables rejection of voided documents. This feature has been primarily developed for US Driver’s Licenses, the results might not be accurate when scanning other document types.

decodeBackOfEuropeanDrivingLicense
boolean getDecodeBackOfEuropeanDrivingLicense()
void setDecodeBackOfEuropeanDrivingLicense(
        boolean value)

Added in version 6.25.0

This setting enables the extraction of additional data about vehicle categories from the back of European driver’s licenses, like issue and expiry dates.

rejectExpiredIds
boolean getRejectExpiredIds()
void setRejectExpiredIds(boolean value)

Added in version 7.1.0

This setting allows to reject expired documents.

rejectIdsExpiringIn
@Nullable Duration getRejectIdsExpiringIn()
void setRejectIdsExpiringIn(@Nullable Duration value)

Added in version 7.1.0

This setting allows to reject documents that will expire within the specified duration. The duration components are applied on the date of expiry in the following order: years, months and days. Enabling this setting automatically enables the rejection of expired IDs.

rejectNotRealIdCompliant
boolean getRejectNotRealIdCompliant()
void setRejectNotRealIdCompliant(boolean value)

Added in version 7.1.0

This setting allows to reject not Real ID compliant documents.

rejectForgedAamvaBarcodes
boolean getRejectForgedAamvaBarcodes()
void setRejectForgedAamvaBarcodes(boolean value)

Added in version 7.1.0

This setting allows to reject documents with a forged AAMVA barcode.

rejectInconsistentData
boolean getRejectInconsistentData()
void setRejectInconsistentData(boolean value)

Added in version 7.1.0

This setting allows to reject documents with inconsistent data.

rejectHolderBelowAge
@Nullable Integer getRejectHolderBelowAge()
void setRejectHolderBelowAge(@Nullable Integer value)

Added in version 7.1.0

This setting allows to reject documents whose holder is below the specified age.

rejectionTimeoutSeconds
int getRejectionTimeoutSeconds()
void setRejectionTimeoutSeconds(int value)

Added in version 8.1.0

The timeout in seconds for document localization without successful capture. When a document is localized but not captured within this duration, the IdCaptureListener.onIdRejected() callback is triggered with RejectionReason.TIMEOUT. Default is 6 seconds. Values less than or equal to 0 reset to the default value.