Usage
Document steps
These steps are available with the Document SDK
Document capture step
Step that responsible for capturing user document
By press on the Capture button the user will be led to the capture screen. Photo will be made automatically as soon as the document fits the frame and recognized
By press on Gallery button the user can upload a photo of the document from the device drive
docType
- type of the document (optional, by default DocType.ANY)title
- title field (optional)instruction
- instruction text (optional)useGallery
- gives user possibility to upload document photo from the device drive (optional, by default false)btnGallery
- text on the Gallery button (optional)btnCapture
- text on the Capture button (optional)image
- image (optional)mask
- mask for the capturing screen (optional)isMultipage
- support of multipage documents, available only ifdocType
is DocType.ANY (optional, by default false)isDoublePage
- support of double page spread, available only ifdocType
is DocType.ANY (optional, by default false)frontAnimationImage
- front side of the multipage scan help animation (optional)backAnimationImage
- back side of the multipage scan help animation (optional)frameColorDefault
- hex color code for the frame of the capturing screen (optional, by default transparent)frameColorActive
- hex color code for the frame of the capturing screen while reading a document (optional, by default colorPrimary)backgroundOpacity
- capturing screen background opacity (optional, by default 0.3f)hintStyle
- appearance of the hints on the capturing screen (optional)withRfid
- allows to read RFID chip of the scanned document (optional)customDatabase
- id of a custom database for the document recognition (optional)nextStep
- next step (optional)
Predefined types of document:
SDK has the list of predefined masks for the document capturing screen:
It is possible to use a custom database for the document recognition in two ways:
manually add the
db.dat
file to theapp/src/main/assets/Reader
folder;specify database ID as a value of
customDatabase
parameter.
Hints on the capturing screen can be styled
textColor
- color of the hint text (optional)textBackgroundColor
- color of the hint text background (optional)fontSize
- hint text size insp
(optional)textPosition
- position of the hint on the capturing screen, 0f - very top, 1f - the center (optional)
RFID step
It is sub-step of the Document capture step and allows to read RFID chip of the scanned document. It works only for devices that have corresponding option (NFC)
title
- title field (optional)instruction
- instruction text (optional)btnProceed
- text on the Proceed button (optional)btnCancel
- text on the Cancel button (optional)btnRetry
- text on the Retry button (optional)waitingTitle
- title field while device is looking for chip (optional)waitingText
- text message while device is looking for chip (optional)successTitle
- title in successful case scenario (optional)successText
- text message in successful case scenario (optional)successImage
- image in successful case scenario (optional)failTitle
- title in fail case scenario (optional)failText
- text message in fail case scenario (optional)failImage
- image in fail case scenario (optional)
Document selector step
Provides list of documents that can be scanned during the verification flow
title
- title field (optional)btnConfirm
- text on the Confirm button (optional)options
- list of acceptable documents
Options is a list of pairs: model that describe option element UI and step related to this option. The step doesn't have to be documentCaptureStep
but might be anyone.
OCR step
It is helpful is you scan a specific document and need to extract some particular text from it. If SDK can't find required text or it is recognized incorrectly, user sill will be able to edit final result
title
- title field (optional)btnProceed
- text on the Proceed button (optional)inputLength
- length of the seeking text (optional, by default 10)inputType
- android.text.InputType (optional, by defaultInputType.TYPE_CLASS_NUMBER
)inputPattern
- regex of the seeking text (optional)nextStep
- next step (optional)
Last updated