AAMVA Cloud Verifier

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

class AamvaCloudVerificationResult

Added in version 6.15.0

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

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 AamvaCloudVerificationTask

Added in version 6.15.0

The asynchronous verification task.

void doOnVerificationResult(@NonNull Function1<@NonNull AamvaCloudVerificationResult, @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 because connection with the server cannot be established.

class AamvaCloudVerifier

Added in version 6.15.0

The verifier that sends data to a Scandit’s server to check the authenticity of an AAMVA-compliant personal identification document.

First, ensure that your Scandit Data Capture SDK license key supports cloud verification. Then, create an instance of AamvaCloudVerifier:

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

This kind of verification uses only data encoded in the barcode on the back side of the document. Therefore, you may capture both sides of the document, like in the previous example, or you may limit the capture just to the barcode.

Depending on the approach you choose initialize the mode with the following settings for the front & back:

IdCaptureSettings settings = new IdCaptureSettings();

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

Or for the barcode only:

IdCaptureSettings settings = new IdCaptureSettings();

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

Once the barcode is captured, trigger the verification process. The process is asynchronous and the result will be delivered once our server verifies the received data:

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.
        AamvaCloudVerificationTask task = verifier.verify(capturedId)
          .doOnVerificationResult { result ->
              if (result.allChecksPassed()) {
                  // Nothing suspicious was detected.
              } else {
                  // Document may be fraudulent or tampered with - proceed with caution.
          .doOnConnectionError { throwable ->
              // Unable to reach the server - most probably the device has no internet connection.
static @NonNull AamvaCloudVerifier create(@NonNull DataCaptureContext context)

Added in version 6.15.0

Creates a new instance of this verifier.

@NonNull AamvaCloudVerificationTask verify(CapturedId capturedId)

Added in version 6.15.0

Connect to asynchronously to the server and conduct the verification of the specified AAMVA-compliant personal identification document.