Custom settings
This page covers the description of custom settings
Contents
Process Params
Multipage Processing
Multipage processing allows to read more than one page. Turn on/off multipage:
DocumentReader.Instance().processParams().multipageProcessing = true;DocumentReader.Instance().processParams().multipageProcessing = trueDisplay Formats
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";DocumentReader.Instance().processParams().dateFormat = "dd-mm-yyyy"If you want to change the measure system, use one of the RGLMeasureSystem members:
DocumentReader.Instance().processParams().measureSystem = RGLMeasureSystem.METRIC;DocumentReader.Instance().processParams().measureSystem = RGLMeasureSystem.METRICLogs
If set, SDK logs will be written to the logcat:
DocumentReader.Instance().processParams().setLogs(true);DocumentReader.Instance().processParams().setLogs(true)If set, logs will be saved (in case of reading problems). Turn on/off logs saving:
DocumentReader.Instance().processParams().debugSaveLogs = true;DocumentReader.Instance().processParams().debugSaveLogs = trueIf set, input images will be saved (in case of reading problems). Turn on/off images saving:
DocumentReader.Instance().processParams().debugSaveImages = true;DocumentReader.Instance().processParams().debugSaveImages = trueIf set, input images will be cropped and saved. Turn on/off image saving:
DocumentReader.Instance().processParams().debugSaveCroppedImages = true;DocumentReader.Instance().processParams().debugSaveCroppedImages = trueAllows 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().sessionLogFolderDocumentReader.Instance().processParams().sessionLogFolderScenario
Set proper scenario. You can find information of how to get available scenarios here:
DocumentReader.Instance().processParams().scenario = "Barcode";DocumentReader.Instance().processParams().scenario = "Barcode"You can assign a scenario to the Capture button. This scenario will be used if you press the button:
DocumentReader.Instance().processParams().captureButtonScenario = "Locate";DocumentReader.Instance().processParams().captureButtonScenario = "Locate"Barcode Types
Set the types of barcodes that you wish to process:
DocumentReader.Instance().processParams().doBarcodes = new String[]{BarcodeType.valueOf(BarcodeType.PDF417), BarcodeType.valueOf(BarcodeType.QRCODE)};DocumentReader.Instance().processParams().doBarcodes = arrayOf(BarcodeType.valueOf(BarcodeType.PDF417), BarcodeType.valueOf(BarcodeType.QRCODE))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};DocumentReader.Instance().processParams().documentIDList = intArrayOf(-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};DocumentReader.Instance().processParams().fieldTypesFilter = intArrayOf(eVisualFieldType.FT_DATE_OF_EXPIRY)Detection
If you enable this parameter, document focus check will be omitted:
DocumentReader.Instance().processParams().disableFocusingCheck = false;DocumentReader.Instance().processParams().disableFocusingCheck = falseUncropped Image
If set, an original (uncropped) image will be received, which is sent to Core for processing:
DocumentReader.Instance().processParams().returnUncroppedImage = true;DocumentReader.Instance().processParams().returnUncroppedImage = trueJSON
Allows to transfer custom JSON to Core, which should be processed:
DocumentReader.Instance().processParams().customParams = new JSONObject("{\"key\":\"value\"}");DocumentReader.Instance().processParams().customParams = JSONObject("""{"key":"value"}""")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().setCameraFrame(DocReaderFrame.MAX);DocumentReader.Instance().functionality().setCameraFrame(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().setShowTorchButton(true);DocumentReader.Instance().functionality().isShowTorchButton = trueShow/hide close button:
DocumentReader.Instance().functionality().setShowCloseButton(true);DocumentReader.Instance().functionality().isShowCloseButton = trueCapture allows to take picture and process as a single frame. Show/hide capture button:
DocumentReader.Instance().functionality().setShowCaptureButton(true);DocumentReader.Instance().functionality().isShowCaptureButton = trueYou can set the time interval when Capture button should be displayed after the document is detected. 5 seconds is used by default:
DocumentReader.Instance().functionality().setShowCaptureButtonDelayFromDetect(5);To use this setting you should enable the setShowCaptureButton() parameter.
DocumentReader.Instance().functionality().showCaptureButtonDelayFromDetect = 5To use this setting you should enable the isShowCaptureButton parameter.
You can set the time interval when Capture button should be displayed after the scanning process is started. 10 seconds is used by default:
DocumentReader.Instance().functionality().setShowCaptureButtonDelayFromStart(10);To use this setting you should enable the setShowCaptureButton() parameter.
DocumentReader.Instance().functionality().showCaptureButtonDelayFromStart = 10To use this setting you should enable the isShowCaptureButton parameter.
If set, frame expanding button will be shown on video capture screen. Show/hide change frame button:
DocumentReader.Instance().functionality().setShowChangeFrameButton(true);DocumentReader.Instance().functionality().isShowChangeFrameButton = trueShow/hide skip next page button:
DocumentReader.Instance().functionality().setShowSkipNextPageButton(true);DocumentReader.Instance().functionality().isShowSkipNextPageButton = trueShow/hide the button for switching between cameras during processing:
DocumentReader.Instance().functionality().setShowCameraSwitchBtn(true);DocumentReader.Instance().functionality().isShowCameraSwitchBtn = trueDetection
DocumentReader will receive data from Motion Sensor and pause scanning when device is moving. Turn on/off video capture motion control:
DocumentReader.Instance().functionality().setVideoCaptureMotionControl(true);DocumentReader.Instance().functionality().isVideoCaptureMotionControl = trueIf set, scanning will be paused while camera is focusing (it can decrease camera processing speed):
DocumentReader.Instance().functionality().setSkipFocusingFrames(true);DocumentReader.Instance().functionality().isSkipFocusingFrames = trueOrientation
Defines orientation of activities by using one of DocReaderOrientation members:
DocumentReader.Instance().functionality().setOrientation(DocReaderOrientation.PORTRAIT);DocumentReader.Instance().functionality().setOrientation(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().setPictureOnBoundsReady(true);DocumentReader.Instance().functionality().isPictureOnBoundsReady = trueCustomization
Camera Frame

Set thickness of document bounds border on the video preview (dp):
DocumentReader.Instance().customization().setCameraFrameBorderWidth(5);DocumentReader.Instance().customization().setCameraFrameBorderWidth(5)Hex string of document bounds border color in default state:
DocumentReader.Instance().customization().setCameraFrameDefaultColor("#ff0000");DocumentReader.Instance().customization().setCameraFrameDefaultColor("#ff0000")Hex string of document bounds border color in document detected state:
DocumentReader.Instance().customization().setCameraFrameActiveColor("#c300ff");DocumentReader.Instance().customization().setCameraFrameActiveColor("#c300ff")Defines the shape of document bounds border. Use one of FrameShapeType members:
DocumentReader.Instance().customization().setCameraFrameShapeType(FrameShapeType.CORNER);DocumentReader.Instance().customization().setCameraFrameShapeType(FrameShapeType.CORNER)Defines the length (dp) of the corner side in shape mode FrameShapeType.CORNER:
DocumentReader.Instance().customization().setCameraFrameLineLength(50);DocumentReader.Instance().customization().setCameraFrameLineLength(50)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().setStatus("Hello");DocumentReader.Instance().customization().setStatus("Hello")Turn on/off status message:
DocumentReader.Instance().customization().setShowStatusMessages(true);DocumentReader.Instance().customization().isShowStatusMessages = trueSet the text font for the status message, so-called hint message:
DocumentReader.Instance().customization().setStatusTextFont(Typeface.SERIF);DocumentReader.Instance().customization().setStatusTextFont(Typeface.SERIF)Size of main text status (sp):
DocumentReader.Instance().customization().setStatusTextSize(14);DocumentReader.Instance().customization().setStatusTextSize(14)Hex string of main text status color:
DocumentReader.Instance().customization().setStatusTextColor("#ff0000");DocumentReader.Instance().customization().setStatusTextColor("#ff0000")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().setStatusPositionMultiplier(0.5D);DocumentReader.Instance().customization().setStatusPositionMultiplier(0.5)Result Status Message

Set a result status message next to the frame:
DocumentReader.Instance().customization().setResultStatus("Hello");DocumentReader.Instance().customization().resultStatus = "Hello"Turn on/off result status message:
DocumentReader.Instance().customization().setShowResultStatusMessages(true);DocumentReader.Instance().customization().isShowResultStatusMessages = trueSet the text font for the current status:
DocumentReader.Instance().customization().setResultStatusTextFont(Typeface.SERIF);DocumentReader.Instance().customization().setResultStatusTextFont(Typeface.SERIF)Set the size of current text status (sp):
DocumentReader.Instance().customization().setResultStatusTextSize(14);DocumentReader.Instance().customization().setResultStatusTextSize(14)Hex string of current text status color:
DocumentReader.Instance().customization().setResultStatusTextColor("#ff0000");DocumentReader.Instance().customization().setResultStatusTextColor("#ff0000")Hex string of current text status background color:
DocumentReader.Instance().customization().setResultStatusBackgroundColor("#ff0000");DocumentReader.Instance().customization().setResultStatusBackgroundColor("#ff0000")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().setResultStatusPositionMultiplier(0.5D);DocumentReader.Instance().customization().setResultStatusPositionMultiplier(0.5)Animation

If set, animation showing how to position document will be displayed. Show/hide help animation:
DocumentReader.Instance().customization().setShowHelpAnimation(true);DocumentReader.Instance().customization().isShowHelpAnimation = trueYou can set image for the help animation. If not set, default image will be used:
DocumentReader.Instance().customization().setHelpAnimationImageID(R.drawable.icon);DocumentReader.Instance().customization().setHelpAnimationImageID(R.drawable.icon)Allows to change the scaling of the help animation image, use one of ImageView.ScaleType members:
DocumentReader.Instance().customization().setHelpAnimationImageScaleType(ImageView.ScaleType.MATRIX);
Matrix matrix = new Matrix();
DocumentReader.Instance().customization().setHelpAnimationImageMatrix(matrix);DocumentReader.Instance().customization().helpAnimationImageScaleType = ImageView.ScaleType.MATRIX
val matrix = Matrix()
DocumentReader.Instance().customization().helpAnimationImageMatrix = matrixIf set, expecting page turn animation will be shown. Turn on/off next page animation:
DocumentReader.Instance().customization().setShowNextPageAnimation(true);DocumentReader.Instance().customization().isShowNextPageAnimation = trueYou can set front image for the multipage animation. If not set, default image will be used:
DocumentReader.Instance().customization().setMultipageAnimationFrontImage(R.drawable.icon);DocumentReader.Instance().customization().setMultipageAnimationFrontImage(R.drawable.icon)Allows to change the scaling of front image of the multipage animation, use one of ImageView.ScaleType members:
DocumentReader.Instance().customization().setMultipageAnimationFrontImageScaleType(ImageView.ScaleType.MATRIX);
Matrix matrix = new Matrix();
DocumentReader.Instance().customization().setMultipageAnimationFrontImageMatrix(matrix);DocumentReader.Instance().customization().multipageAnimationFrontImageScaleType = ImageView.ScaleType.MATRIX
val matrix = Matrix()
DocumentReader.Instance().customization().multipageAnimationFrontImageMatrix = matrixYou can set back image for the multipage animation. If not set, default image will be used:
DocumentReader.Instance().customization().setMultipageAnimationBackImage(R.drawable.icon);DocumentReader.Instance().customization().setMultipageAnimationBackImage(R.drawable.icon)Allows to change the scaling of back image of the multipage animation, use one of ImageView.ScaleType members:
DocumentReader.Instance().customization().setMultipageAnimationBackImageScaleType(ImageView.ScaleType.MATRIX);
Matrix matrix = new Matrix();
DocumentReader.Instance().customization().setMultipageAnimationBackImageMatrix(matrix);DocumentReader.Instance().customization().multipageAnimationBackImageScaleType = ImageView.ScaleType.MATRIX
val matrix = Matrix()
DocumentReader.Instance().customization().multipageAnimationBackImageMatrix = matrixVisual Elements

Hex string of visual elements color (one for all):
DocumentReader.Instance().customization().setTintColor("#ff0000");DocumentReader.Instance().customization().setTintColor("#ff0000")Skip Button

Set the background color to the multipage button:
DocumentReader.Instance().customization().setMultipageButtonBackgroundColor("#ff0000");DocumentReader.Instance().customization().setMultipageButtonBackgroundColor("#ff0000")Loading Indicator

Hex string of loading indicator(s) color. You can see it if you press the capture button:
DocumentReader.Instance().customization().setActivityIndicatorColor("#ff0000");DocumentReader.Instance().customization().setActivityIndicatorColor("#ff0000")Background

If set, background will be darkened around the document detection frame. Show/hide background mask:
DocumentReader.Instance().customization().setShowBackgroundMask(true);DocumentReader.Instance().customization().isShowBackgroundMask = trueAllows to change the intensity of the background mask:
DocumentReader.Instance().customization().setBackgroundMaskAlpha(0.5F);DocumentReader.Instance().customization().backgroundMaskAlpha = 0.5FAllows to set image within camera frame:
DocumentReader.Instance().customization().setBorderBackgroundImage(R.drawable.icon);DocumentReader.Instance().customization().setBorderBackgroundImage(R.drawable.icon)Version
To get the API version use:
DocumentReader.Instance().version.apiDocumentReader.Instance().version.apiTo get the Core version use:
DocumentReader.Instance().version.coreDocumentReader.Instance().version.coreTo get the Core mode use:
DocumentReader.Instance().version.coreModeDocumentReader.Instance().version.coreModeAllows you to get database id, e.g. KAZ:
DocumentReader.Instance().version.database.databaseIDDocumentReader.Instance().version.database.databaseIDTo get the database version use:
DocumentReader.Instance().version.database.versionDocumentReader.Instance().version.database.versionAllows you to get the database export date:
DocumentReader.Instance().version.database.dateDocumentReader.Instance().version.database.dateTo get the list of supported database documents use:
DocumentReader.Instance().version.database.databaseDescriptionDocumentReader.Instance().version.database.databaseDescriptionAllows to get the number of supported database countries:
DocumentReader.Instance().version.database.countriesNumberDocumentReader.Instance().version.database.countriesNumberAllows to get the number of supported database documents:
DocumentReader.Instance().version.database.documentsNumberDocumentReader.Instance().version.database.documentsNumberLicense
Allows to get an expiration date of the license:
DocumentReader.Instance().licenseResult().license().getExpiryDate()DocumentReader.Instance().licenseResult().license().expiryDateAllows to get a list of country identifiers which are defined for processing in the license. If the array is empty, there are no restrictions for processing:
DocumentReader.Instance().licenseResult().license().getCountryFilter()DocumentReader.Instance().licenseResult().license().countryFilterRFID-chip
RFID-chip reading parameters:
DocumentReader.Instance().rfidScenario()DocumentReader.Instance().rfidScenario()Last updated
Was this helpful?