AAMVA Barcode Verifier
Defined in namespace Scandit.DataCapture.Id.Verification.Aamvabarcode
- AamvaBarcodeVerificationResult
class AamvaBarcodeVerificationResult
Added in version 6.20.0
The result of a verification of AAMVA-compliant personal identification document done by AamvaBarcodeVerifier.
- AllChecksPassed
bool
AllChecksPassed { get; }Added in version 6.20.0
All checks passed and nothing suspicious about the document was detected.
- AamvaBarcodeVerifier
class AamvaBarcodeVerifier
Added in version 6.20.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 barcodeVerifier = AamvaBarcodeVerifier.Create(dataCaptureContext);
Then either initialize the front & back scanning mode:
IdCaptureSettings settings = new IdCaptureSettings(); settings.SupportedDocuments = IdDocumentType.DlViz; settings.SupportedSides = SupportedSides.FrontAndBack; IdCapture idCapture = IdCapture.Create(dataCaptureContext, settings);
Or initialize single-sided scanning of the back of the document:
IdCaptureSettings settings = new IdCaptureSettings(); settings.SupportedDocuments = IdDocumentType.AamvaBarcode; 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:
public void OnIdCaptured(IdCapture capture, IdCaptureSession session, IFrameData frameData) { if (session.NewlyCapturedId == null) { return; } CapturedId capturedId = session.NewlyCapturedId; if (capturedId.AamvaBarcode != null) { barcodeVerifier.VerifyCapturedIdAsync(capturedId).ContinueWith((task) => { if (task.IsFaulted || task.IsCanceled) { // Error occurred during verification } else { AamvaBarcodeVerificationResult result = task.Result; if (result.AllChecksPassed) { // Nothing suspicious was detected. } else { // Document may be fraudulent or tampered with - proceed with caution. } } }); } }
- Create()
static AamvaBarcodeVerifier Create(DataCaptureContext context)
Added in version 6.20.0
Creates a new instance of this verifier.
- VerifyCapturedIdAsync()
Task<AamvaBarcodeVerificationResult> VerifyCapturedIdAsync(CapturedId capturedId)
Added in version 6.20.0
Asynchronously conduct the verification of the specified AAMVA-compliant personal identification document.