Usage
Introduction
ElkycDocumentSDK will help you to scan document, barcode, QR code, or take a person selfie, the goal is to build easy steps which you can run and get the result to your system or in your application.
Don't forget that framework depends on ElkycCoreSDK. Please read the documentation there first.
The whole process is going synchronously from the first to the last step. During the process, data will be sent to our or your backend. The process will stop if any of the steps will return an error.
Before starting using library you should always check for database update. If you don't want to download and update database you can add it manually to your project and skip this step. Use DocumentReader class for this. Note: you can pass a databaseID parameter if needed, by default DocumentReader downloading full database.
Add Documents Database manually
This option is perfect for those types of apps that need to work offline. Follow next steps:
Request access and download Database file.
Add file
db.dat
to the project and link it to required target (do not modify file name).
Once you build and run the project, database will be located inside the application and processed by the SDK automatically.
DocumentResult
DocumentResult is a struct returned by DocumentImageScan, DocumentScan, UkrPassportScan, CaptureWithConfirm and RfidDocumentScan steps. This structure contains all information regarding document scan.
elapsedTime - time passed during the scan
elapsedTimeRFID - time passed during RFID scan
overallResult - validation result, CheckResult
morePagesAvailable - if document has more pages to scan
types - information about document type
graphics - information about images in the document or at RFID
texts - information about text scanned visually, from MRZ or RFID
stepType - document type, mostly used internally
hasRFID - boolean indicated if this document has rfid or not
DocType
DocType struct represents a document type.
name - document name
pageIndex - an index of the document page whence results are received
hasMRZ - flag for MRZ presence on a document
icao - document issuing country ICAO code
type - document type, DocType
year - document issue year
format - document format, DocFormat
DocumentGraphic
DocumentGraphic struct represents a document image.
fieldType - graphic field logical type, GraphicFieldType
sourceType - identifies zone whence data is extracted, ResultType
pageIndex - an index of the document page whence the graphic field is extracted
image - an base64 encoded image
originalImage - an image
DocumentText
DocumentText struct represents a document text field.
status - textual field check result, CheckResult
fieldType - textual field logical type, FieldType
lcid - ID of language-culture to differentiate one field of the same type from another (for example Belarus Passport Page # 31 – Belarusian and Russian fields of the same type), Lcid
values - an array of values
DocumentTextValue
DocumentTextValue struсt represents a document text value
pageIndex - an index of the document page whence the textual field is extracted
probability - textual field recognition probability (0 - 100, %)
value - a value
validity - verification result, FieldVerificationResult
sourceType - identifies zone whence data is extracted, ResultType
comparison - a comparison result of a textual field values where the key is one of ResultType values and the value is one of FieldVerificationResult values
Last updated