Document Scanner Configuration
Class which is used to configure io.scanbot.sdk.ui.view.camera.DocumentScannerActivity Contains settings indicating views Behaviour, Texts and Appearance
Functions
Enable pressing hardware button to make snap on this screen. Pass KeyEvent.KEYCODE_VOLUME_DOWN or any other KeyEvent.KEYCODE that is supported by the device. By default for kotlin KeyEvent.KEYCODE_VOLUME_DOWN code being used.
The minimum score in percent (0 - 100) of the perspective distortion to accept a detected document. Default is 75.0.
The brightness threshold to accept a detected document in the range of 0 (very dark) to 255 (very bright). If the average brightness value of the detectors input image is below this value, the status of the detection will be set to ERROR_TOO_DARK. Default is 50.0.
The minimum document width or height in percent (0 - 100) of the screen size to accept a detected document. Default is 80.0.
A configuration with accessibility texts settings.
Controls whether the auto-snapping toggle button is hidden or not.
Title of the auto-snapping toggle button.
When auto-snapping is enabled the document scanner will take a photo automatically when a document is detected, conditions are good and the auto-snapping time-out elapses. In this mode the user can still tap the shutter button to snap a document.
Controls the auto-snapping speed. Sensitivity must be within the 0..1 range. A value of 1.0 triggers automatic capturing immediately, a value of 0.0 delays the automatic by 3 seconds. The default value is 0.66 (2 seconds)
The background color of the bottom shutter-bar.
The color of the title of all buttons in the bottom shutter-bar (Cancel button, etc.), as well as the camera permission prompt button.
The color of the camera background (relevant only when the camera preview mode is CameraPreviewMode.FIT_IN).
Set supported camera module: CameraModule.BACK, CameraModule.FRONT or others. Optional. By default is CameraModule.BACK.
Preview mode of the camera: Fit-In or Fill-In. Optional, default is Fill-In.
Title of the cancel button.
Delay that camera will took before snap on auto focus complete called from camera core in ms. For some devices this callback could call even before real auto focus completed, so we need to take some delay before snapping. Usually you can set 500ms. By default it is set to 20ms.
Document image size limit. Should be positives Ints. Means that if the document size will be bigger than a limit, then it will be downscaled with aspectRatio kept. By default the limit is Int.MAX_VALUE, so there are no scaling.
Draw shadows under polygon stroke if polygon background color is transparent
Title of the button that opens the screen where the user can allow the usage of the camera by the app.
Text that will be displayed when the app is not allowed to use the camera, prompting the user to enable the usage of the camera.
Controls whether the flash toggle button is hidden or not.
Title of the flash toggle button.
Controls whether the flash should be initially enabled. The default value is FALSE.
Set whether camera should force maximum possible size of snapped picture or use maximum size that available with the same aspect ratio as preview by default set to false
This parameter works only with ScanbotCameraXView
enabled
Force of showing PolygonView and user guiding when autosnapping is disabled
Sets whether to ignore the DetectionStatus.OK_BUT_ORIENTAION_MISMATCH detection status. By default ignoreOrientationMismatch is not ignored.
Add default filtration for scanned document for given ImageFilterType
The image scaling factor. The factor must be within the 0..1 range. A factor of 1 means that the resulting images retain their original size. When the factor is less than 1, resulting images will be made smaller by that factor. By default the scale is 1.
Defines max number of scanned pages. This parameter works only if the “multipage” feature is enabled. Once the number of scanned pages was reached, the Document Scanner will be closed.
Controls whether the multi-page toggle button is hidden or not.
Title of the multi-page mode toggle button.
Controls multi-page mode. When enabled, the user can take multiple document photos before closing the screen by tapping the page counter button. When disabled, the screen will be closed immediately after the first document photo is made. The default value is FALSE.
Orientation lock mode of the camera: PORTRAIT or LANDSCAPE. By default the camera orientation is not locked.
Title suffix of the button that finishes the document scanning when multi-page scanning is enabled. The button's title has the format "# Pages", where # shows the number of images captured up to now and the suffix "Pages" is set using this method.
Add default filtration for scanned document for given ParametricFilter
The prioritization of still image quality and capturing speed. Defaults to CapturePhotoQualityPrioritization.BALANCED. If you experience lots of blurry still images try to set this property to CapturePhotoQualityPrioritization.QUALITY
The color of the outline progress animation before the snap being taken after the successful document scanning DocumentDetectionStatus.OK.
Enable/disable polygon autoSnap progress animation
Width of the document autoSnap animation outline.
The background color of the detected document outline when the document's angle, size or aspect ratio is not yet sufficiently good. (All DocumentDetectionStatus with OK_BUT_XXX).
The background color of the detected document outline when we are ready to snap DocumentDetectionStatus.OK.
The color of the detected document outline when the document's angle, size or aspect ratio is not yet sufficiently good. (All detection statuses in DocumentDetectionStatus that have the OK_BUT_XXX prefix).
The color of the detected document outline when we are ready to snap DocumentDetectionStatus.OK.
Radius of corners of the detected document outline.
Width of the detected document outline in Px.
Allowed aspect ratios of the document.
The foreground color of the shutter button in auto-snapping mode.
The background color of the shutter button in auto-snapping mode.
Controls whether the shutter button is hidden or not. If true - enable auto-snapping mode and hides the auto-snapping toggle button.
The foreground color of the shutter button in manual mode.
The background color of the shutter button in manual mode.
Set camera shutter sound state. {@code true} if a sound should be played when taking a picture, {@code false} - otherwise By default, the camera plays the system-defined camera shutter sound when taking a picture.
Text hint that will be shown when the current detection status is DocumentDetectionStatus.OK_BUT_BAD_ANGLES
Text hint that will be shown when the current detection status is DocumentDetectionStatus.OK_BUT_BAD_ASPECT_RATIO
Text hint that will be shown when the current detection status is DocumentDetectionStatus.ERROR_NOTHING_DETECTED
Text hint that will be shown when the current detection status is DocumentDetectionStatus.OK
Text hint that will be shown when the current detection status is DocumentDetectionStatus.ERROR_TOO_DARK
Text hint that will be shown when the current detection status is DocumentDetectionStatus.ERROR_TOO_NOISY
Text hint that will be shown when the current detection status is DocumentDetectionStatus.OK_BUT_TOO_SMALL
The background color of the top toolbar.
The color of all active toggle buttons in the toolbar.
The color of all inactive toggle buttons in the toolbar.
Controls whether the touch to focus feature should be enabled. Default is true
.
Controls whether buttons should use all capitals style
The background color of the user guidance hints.
The text color of the user guidance hints.