Custom settings

This page covers the description of customizable settings

Contents

Process Params

Multipage Processing

Multipage processing allows to read more than one page. Turn on/off multipage:

DocumentReader.Instance().processParams.multipageProcessing = true/false

Date Format

You can change the format string of displayed dates in the results. Mask examples: "dd/mm/yyyy", "mm/dd/yyyy", "dd-mm-yyyy", "mm-dd-yyyy", "dd/mm/yy":

DocumentReader.Instance().processParams.dateFormat = "dd-mm-yyyy"

Logs

If set, Core logs will be written to logcat:

DocumentReader.Instance().processParams.logs = true/false

If set, deep logs will be saved (in case of reading problems). Turn on/off logs saving:

DocumentReader.Instance().processParams.debugSaveLogs = true/false

If set, input images will be saved (in case of reading problems). Turn on/off images saving:

DocumentReader.Instance().processParams.debugSaveImages = true/false

If set, input images will be cropped and saved. Turn on/off image saving:

DocumentReader.Instance().processParams.debugSaveCroppedImages = true/false

Allows you to get the path to the folder of the current session. Before using this, enable save logs. Each new session provides different path:

DocumentReader.Instance().processParams.sessionLogFolder

Scenario

Set proper scenario. You can find information of how to get available scenarios here:

DocumentReader.Instance().processParams.scenario = "Barcode"

Barcode Types

Set the types of barcodes that you wish to process:

DocumentReader.Instance().processParams.doBarcodes = new String[]{BarcodeTypes.QR, BarcodeTypes.Barcode_1D}

RFID-chip

RFID-chip reading parameters:

DocumentReader.Instance().processParams.rfidScenario

Filters

Set the list of the document ID's to process. All documents will be processed, if empty:

DocumentReader.Instance().processParams.documentIDList = new int[]{-274257313, -2004898043}

If you read document which contains MRZ, all fields will be extracted. If you read document with OCR, you can set the list of field types that you wish to extract, other fields will be skipped during processing. All fields will be extracted, if the fieldTypesFilter is empty:

DocumentReader.Instance().processParams.fieldTypesFilter = new int[]{eVisualFieldType.FT_DATE_OF_EXPIRY}

Detection

If you enable this parameter, document focus check will be omitted:

DocumentReader.Instance().processParams.disableFocusingCheck = true/false

Functionality

Camera Frame

Set this setting to override default cropping frame on camera activity provided by scenario using one of DocReaderFrame members:

DocumentReader.Instance().functionality.cameraFrame = DocReaderFrame.MAX

Frame is cropped by camera frame. If you set the camera frame to full screen, Core will crop frame by phone borders. Using this setting may lead to lower performance because of huge frame size. Any changes which are connected with camera frame alter scanning process. You can also set the camera frame width.

Buttons

Show/hide torch button:

DocumentReader.Instance().functionality.showTorchButton = true/false

Show/hide close button:

DocumentReader.Instance().functionality.showCloseButton = true/false

You can close camera view manually by using DocumentReader.Instance().stopScanner() function.

Capture allows to take picture and process as a single frame. Show/hide capture button:

DocumentReader.Instance().functionality.showCaptureButton = true/false

If set, frame expanding button will be shown on video capture screen. Show/hide change frame button:

DocumentReader.Instance().functionality.showChangeFrameButton = true/false

Show/hide skip next page button:

DocumentReader.Instance().functionality.showSkipNextPageButton = true/false

Show/hide the button for switching between cameras during processing:

DocumentReader.Instance().functionality.showCameraSwitchBtn = true/false

Detection

DocumentReader will receive data from Motion Sensor and pause scanning when device is moving. Turn on/off video capture motion control:

DocumentReader.Instance().functionality.videoCaptureMotionControl = true/false

If set, scanning will be paused while camera is focusing (it can decrease camera processing speed):

DocumentReader.Instance().functionality.skipFocusingFrames = true/false

Orientation

Defines orientation of activities by using one of DocReaderOrientation members:

DocumentReader.Instance().functionality.orientation = DocReaderOrientation.PORTRAIT

Single Frame Capturing

If set, as soon as document is located during video mode, picture will be taken and processed as single frame. It is used for devices with poor-quality video preview:

DocumentReader.Instance().functionality.pictureOnBoundsReady = true/false

Customization

Camera Frame

Set thickness of document bounds border on the video preview (dp):

DocumentReader.Instance().customization.cameraFrameBorderWidth

Hex string of document bounds border color in default state:

DocumentReader.Instance().customization.cameraFrameDefaultColor

Hex string of document bounds border color in document detected state:

DocumentReader.Instance().customization.cameraFrameActiveColor

Defines the shape of document bounds border. Use one of FrameShapeType members:

DocumentReader.Instance().customization.cameraFrameShapeType = FrameShapeType.CORNER

Defines the length (dp) of the corner side in shape mode FrameShapeType.CORNER:

DocumentReader.Instance().customization.cameraFrameLineLength

Frame is cropped by camera frame. Any changes with camera frame may alter scanning process. You can change the default camera frame view, even remove it. Discover Functionality page to find out how to do it.

Status Message

Set a status message next to the frame:

DocumentReader.Instance().customization.status

Turn on/off status message:

DocumentReader.Instance().customization.showStatusMessages = true/false

Set the text font for the status message, so-called hint message:

DocumentReader.Instance().customization.statusTextFont

Size of main text status (sp):

DocumentReader.Instance().customization.statusTextSize

Hex string of main text status color:

DocumentReader.Instance().customization.statusTextColor

Allows you to change the location of the status. For example, if you set the multiplier to 0.5 and the number of pixels by vertical is equal to 800, your message will be centralized and located at 200 px from top, i.e. (800 / 2) * 0.5 = 200 px. If multiplier is equal to 1, the message will be centered. If multiplier is equal to zero, default location will be used:

DocumentReader.Instance().customization.statusPositionMultiplier = 0.5D

Result Status Message

Turn on/off result status message:

DocumentReader.Instance().customization.showResultStatusMessages = true/false

Set the text font for the current status:

DocumentReader.Instance().customization.resultStatusTextFont

Set the size of current text status (sp):

DocumentReader.Instance().customization.resultStatusTextSize

Hex string of current text status color:

DocumentReader.Instance().customization.resultStatusTextColor

Hex string of current text status background color:

DocumentReader.Instance().customization.resultStatusBackgroundColor

Allows you to change the location of the results status. For example, if you set the multiplier to 0.5 and the number of pixels by vertical is equal to 800, your message will be centralized and located at 200 px from top, i.e. (800 / 2) * 0.5 = 200 px. If multiplier is equal to 1, the message will be centered. If multiplier is equal to zero, default location will be used:

DocumentReader.Instance().customization.resultStatusPositionMultiplier = 0.5D

Animation

If set, animation showing how to position document will be displayed. Show/hide help animation:

DocumentReader.Instance().customization.showHelpAnimation = true/false

If set, expecting page turn animation will be shown. Turn on/off next page animation:

DocumentReader.Instance().customization.showNextPageAnimation = true/false

You can set image for help animation. If not set, default image will be used:

DocumentReader.Instance().customization.helpAnimationImageID = R.drawable.icon

You can set front image for multipage animation. If not set, default image will be used:

DocumentReader.Instance().customization.multipageAnimationFrontImage = R.drawable.icon

You can set back image for multipage animation. If not set, default image will be used:

DocumentReader.Instance().customization.multipageAnimationBackImage = R.drawable.icon

Visual Elements

Hex string of visual elements color (one for all):

DocumentReader.Instance().customization.tintColor

Skip Button

Set the background color to the multipage button:

DocumentReader.Instance().customization.multipageButtonBackgroundColor

Loading Indicator

Hex string of loading indicator(s) color. You can see it if you press the capture button:

DocumentReader.Instance().customization.activityIndicatorColor

Background

If set, background will be darkened around the document detection frame. Show/hide background mask:

DocumentReader.Instance().customization.showBackgroundMask = true/false

Allows to set image within camera frame:

DocumentReader.Instance().customization.borderBackgroundImage = R.drawable.icon

Version

To get the API version use:

DocumentReader.Instance().version.api

To get the Core version use:

DocumentReader.Instance().version.core

To get the Core mode use:

DocumentReader.Instance().version.coreMode

Allows you to get database id, e.g. KAZ:

DocumentReader.Instance().version.database.databaseID

To get the database version use:

DocumentReader.Instance().version.database.version

Allows you to get the database export date:

DocumentReader.Instance().version.database.date

To get the list of supported database documents use:

DocumentReader.Instance().version.database.databaseDescription

Allows to get the number of supported database countries:

DocumentReader.Instance().version.database.countriesNumber

Allows to get the number of supported database documents:

DocumentReader.Instance().version.database.documentsNumber

Last updated