AAMVA Cloud Verifier
Defined in package com.scandit.datacapture.id.verification.aamvacloud
- AamvaCloudVerificationResult
class AamvaCloudVerificationResult
Added in version 6.15.0
The result of a verification of AAMVA-compliant personal identification document done by AamvaCloudVerifier.
- allChecksPassed
boolean
getAllChecksPassed()Added in version 6.15.0
All checks passed and nothing suspicious about the document was detected.
- AamvaCloudVerificationTask
class AamvaCloudVerificationTask
Added in version 6.15.0
The asynchronous verification task.
- doOnVerificationResult(action)
void
doOnVerificationResult(@NonNullFunction1
<@NonNull AamvaCloudVerificationResult, @NonNullUnit
> action)Added in version 6.15.0
Sets the callback that is going to be invoked when the verification is completed.
- AamvaCloudVerifier
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(); settings.setSupportedDocuments(IdDocumentType.DL_VIZ); settings.setSupportedSides(SupportedSides.FRONT_AND_BACK); IdCapture idCapture = IdCapture.create(dataCaptureContext, settings);
Or for the barcode only:
IdCaptureSettings settings = new IdCaptureSettings(); settings.setSupportedDocuments(IdDocumentType.AAMVA_BARCODE); 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:
@Override 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. } } }
- create(context)
static @NonNull AamvaCloudVerifier create(@NonNull DataCaptureContext context)
Added in version 6.15.0
Creates a new instance of this verifier.
- verify(capturedId)
@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.