AAMVA Barcode Verifier

Defined in package com.scandit.datacapture.id.verification.aamvabarcode

class AamvaBarcodeVerificationResult

Added in version 6.15.0

The result of a verification of AAMVA-compliant personal identification document done by AamvaBarcodeVerifier.

boolean getAllChecksPassed()

Added in version 6.15.0

All checks passed and nothing suspicious about the document was detected.

@NonNull String toJson()

Added in version 6.15.0

Returns the JSON representation of this object.

class AamvaBarcodeVerificationTask

Added in version 6.15.0

The asynchronous verification task.

void doOnVerificationResult(@NonNull Function1<@NonNull AamvaBarcodeVerificationResult, @NonNull Unit> action)

Added in version 6.15.0

Sets the callback that is going to be invoked when the verification is completed.

void doOnConnectionFailure(@NonNull Function1<@NonNull Throwable, @NonNull Unit> action)

Added in version 6.15.0

Sets the callback that is going to be invoked when the verification cannot be completed.

class AamvaBarcodeVerifier

Added in version 6.15.0

Validates the authenticity of the document by scanning the barcode on the back. This verifier supports documents that follow the Driver License/Identification Card specification by the American Association of Motor Vehicle Administrators (AAMVA). It requires either the front & back scanning mode or a single-sided scan of the back of the document. Start with creating a capture context and the verifier:

DataCaptureContext dataCaptureContext = DataCaptureContext.forLicenseKey("-- ENTER YOUR SCANDIT LICENSE KEY HERE --");
AamvaBarcodeVerifier verifier = AamvaBarcodeVerifier.create(dataCaptureContext);

Then either initialize the front & back scanning mode:

IdCaptureSettings settings = new IdCaptureSettings();

IdCapture idCapture = IdCapture.create(dataCaptureContext, settings);

Or initialize single-sided scanning of the back of the document:

IdCaptureSettings settings = new IdCaptureSettings();

IdCapture idCapture = IdCapture.create(dataCaptureContext, settings);

Once the capture is complete, trigger the verification process. This process is asynchronous and the result will be delivered once the verification has been completed:

void didCaptureId(IdCapture idCapture, IdCaptureSession session) {
    CapturedId capturedId = session.getNewlyCapturedId();
    AamvaBarcodeResult barcode = capturedId.getAamvaBarcode();

    if (barcode != null) {
        // Trigger the verification. This process is asynchronous, so you may want to store the task and to reconnect the callback if your Activity is recreated.
        AamvaBarcodeVerificationTask task = verifier.verify(capturedId)
          .doOnVerificationResult { result ->
              if (result.allChecksPassed()) {
                  // Nothing suspicious was detected.
              } else {
                  // Document may be fraudulent or tampered with - proceed with caution.
          .doOnConnectionFailure { throwable ->
              // Error occurred during verification
static @NonNull AamvaBarcodeVerifier create(@NonNull DataCaptureContext context)

Added in version 6.15.0

Creates a new instance of this verifier.

@NonNull AamvaBarcodeVerificationTask verify(CapturedId capturedId)

Added in version 6.15.0

Asynchronously conduct the verification of the specified AAMVA-compliant personal identification document.