AAMVA Barcode Verifier
Defined in library scandit_datacapture_id
- AamvaBarcodeVerificationStatus
Added in version 7.3.0
The verification status returned by the barcode verifier
- authentic
Added in version 7.3.0
The barcode is authentic
- likelyForged
Added in version 7.3.0
The barcode is likely forged
- forged
Added in version 7.3.0
The barcode is forged
- AamvaBarcodeVerificationResult
class AamvaBarcodeVerificationResult
Added in version 6.19.0
The result of a verification of AAMVA-compliant personal identification document done by AamvaBarcodeVerifier.
- allChecksPassed
bool get allChecksPassed
Added in version 6.19.0
All checks passed and nothing suspicious about the document was detected.
- status
AamvaBarcodeVerificationStatus get status
Added in version 7.3.0
Verification status containing the result of the verification
- AamvaBarcodeVerifier
class AamvaBarcodeVerifier
Added in version 6.19.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 full (i.e. front & back) scanning mode or a single-sided scan of the back of the document. Start with creating a capture context and the verifier:
var dataCaptureContext = DataCaptureContext.forLicenseKey("-- ENTER YOUR SCANDIT LICENSE KEY HERE --"); var barcodeVerifier = await AamvaBarcodeVerifier.create(dataCaptureContext);
Then either initialize the front & back scanning mode:
var settings = IdCaptureSettings(); settings.supportedDocuments.add(IdDocumentType.dlViz); settings.capturedSides = CapturedSides.frontAndBack; var idCapture = IdCapture.forContext(dataCaptureContext, settings);
Or initialize single-sided scanning of the back of the document:
var settings = IdCaptureSettings(); settings.supportedDocuments.add(IdDocumentType.aamvaBarcode); var idCapture = IdCapture.forContext(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:
@override void didCaptureId(IdCapture idCapture, CapturedId capturedId) async { var barcode = capturedId.aamvaBarcode; if (barcode != null) { barcodeVerifier.verify(capturedId).then((result) { if (result.allChecksPassed) { // Nothing suspicious was detected. } else { // Document may be fraudulent or tampered with - proceed with caution. } }, onError: (error) { // Error occurred during verification }); } }
- create(context)
static Future<AamvaBarcodeVerifier> create( DataCaptureContext context)
Added in version 6.19.0
Creates a new instance of this verifier.
- verify(capturedId)
Future<AamvaBarcodeVerificationResult> verify( CapturedId capturedId)
Added in version 6.19.0
Asynchronously conduct the verification of the specified AAMVA-compliant personal identification document.