BlinkID / blinkid-flutter

ID scanning plugins for cross-platform apps built with Flutter.
80 stars 23 forks source link

Scan result source question #41

Closed jszersze closed 1 year ago

jszersze commented 1 year ago

For ID verification, the SDK seems to extract and parse information from the front of the card rather than the PDF417 code in the back, is this per design (some security concern)? Also, is there a way to change the configuration so that the information extracted about the document comes from the PDF417 instead? This is in case pieces of information on the front of the card are miss-read do to poor lighting conditions, font, etc.

jszersze commented 1 year ago

I noticed that there is actually payload being sent from the API that contains all of the information found in the barcode. How can I access that information from the flutter SDK?

https://docs.microblink.com/documentation/cloudapi/overview.html#tocS_BarcodeResult

mparadina commented 1 year ago

Hi @jszersze

The SDK extracts all of the information from all available information groups (VIZ, MRZ, and the barcode) if we support reading it. All of the fields and information groups that we support reading from every document can be found here, and all of the information that we read from the barcode can be found here.

Documents from which we extract the barcode information have a field called "Barcode data".

On the Flutter SDK, you can extract the barcode information by tapping into the BarcodeResult of the BlinkID Combined recognizer's result. All of the information you can retrieve from it can be found here.

A code example to obtain the barcode information, for instance, the first and last name:

 String getIdResultString(BlinkIdCombinedRecognizerResult result) {
    return buildResult(result.barcodeResult?.firstName, "First name") +
        buildResult(result.barcodeResult?.lastName, "Last name");
}

Let me know if this helped.

jszersze commented 1 year ago

Yes, thank you. I am able to get the barcode data now.