Class DocumentScannerJsonConfiguration
-
- All Implemented Interfaces:
-
android.os.Parcelable
public final class DocumentScannerJsonConfiguration implements Parcelable
-
-
Field Summary
-
Constructor Summary
Constructors Constructor Description DocumentScannerJsonConfiguration(String version, String screen, Double acceptedAngleScore, Double acceptedSizeScore, Double acceptedBrightnessThreshold, Boolean autoSnappingButtonHidden, String autoSnappingButtonTitle, Boolean autoSnappingEnabled, Double autoSnappingSensitivity, JsonColor bottomBarBackgroundColor, JsonColor bottomBarButtonsColor, JsonCameraModule cameraModule, JsonColor cameraBackgroundColor, JsonCameraPreviewMode cameraPreviewMode, Boolean touchToFocusEnabled, String cancelButtonTitle, JsonImageFilterType defaultPageFilter, String enableCameraButtonTitle, String enableCameraExplanationText, Boolean flashButtonHidden, String flashButtonTitle, Boolean flashEnabled, Boolean forceUserGuidance, Boolean ignoreOrientationMismatch, Double imageScale, Boolean multiPageButtonHidden, String multiPageButtonTitle, Boolean multiPageEnabled, JsonOrientationLockMode orientationLockMode, String pageCounterButtonTitle, JsonCapturePhotoQualityPrioritization photoQualityPrioritization, JsonColor polygonBackgroundColor, JsonColor polygonBackgroundColorOK, JsonColor polygonColor, JsonColor polygonColorOK, Double polygonLineWidth, Double polygonCornerRadius, JsonColor polygonAutoSnapProgressColor, Double polygonAutoSnapProgressLineWidth, Boolean polygonAutoSnapProgressEnabled, List<JsonAspectRatio> requiredAspectRatios, JsonColor shutterButtonAutoInnerColor, JsonColor shutterButtonAutoOuterColor, JsonColor shutterButtonManualInnerColor, JsonColor shutterButtonManualOuterColor, String textHintBadAngles, String textHintBadAspectRatio, String textHintNothingDetected, String textHintOffCenter, String textHintOK, String textHintTooDark, String textHintTooNoisy, String textHintTooSmall, JsonColor topBarBackgroundColor, JsonColor topBarButtonsActiveColor, JsonColor topBarButtonsInactiveColor, JsonColor userGuidanceBackgroundColor, JsonColor userGuidanceTextColor, Double userGuidanceFontSize, JsonSize documentImageSizeLimit, Boolean shutterButtonHidden, Integer maxNumberOfPages, Boolean useButtonsAllCaps, JsonDocumentScannerAccessibilityConfiguration accessibilityConfiguration)
-
Method Summary
Modifier and Type Method Description final StringgetVersion()A version of the configuration object final UnitsetVersion(String version)A version of the configuration object final StringgetScreen()The configuration object should be applied for this screen final UnitsetScreen(String screen)The configuration object should be applied for this screen final DoublegetAcceptedAngleScore()The minimum score in percent (0 - 100) of the perspective distortion to accept a detected document. final UnitsetAcceptedAngleScore(Double acceptedAngleScore)The minimum score in percent (0 - 100) of the perspective distortion to accept a detected document. final DoublegetAcceptedSizeScore()The minimum document width or height in percent (0 - 100) of the screen size to accept a detected document. final UnitsetAcceptedSizeScore(Double acceptedSizeScore)The minimum document width or height in percent (0 - 100) of the screen size to accept a detected document. final DoublegetAcceptedBrightnessThreshold()The brightness threshold to accept a detected document in the range of 0 (very dark) to 255 (very bright). final UnitsetAcceptedBrightnessThreshold(Double acceptedBrightnessThreshold)The brightness threshold to accept a detected document in the range of 0 (very dark) to 255 (very bright). final BooleangetAutoSnappingButtonHidden()Controls whether the auto-snapping toggle button is hidden or not. final UnitsetAutoSnappingButtonHidden(Boolean autoSnappingButtonHidden)Controls whether the auto-snapping toggle button is hidden or not. final StringgetAutoSnappingButtonTitle()Title of the auto-snapping toggle button. final UnitsetAutoSnappingButtonTitle(String autoSnappingButtonTitle)Title of the auto-snapping toggle button. final BooleangetAutoSnappingEnabled()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. final UnitsetAutoSnappingEnabled(Boolean autoSnappingEnabled)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. final DoublegetAutoSnappingSensitivity()Controls the auto-snapping speed. final UnitsetAutoSnappingSensitivity(Double autoSnappingSensitivity)Controls the auto-snapping speed. final JsonColorgetBottomBarBackgroundColor()The background color of the bottom shutter-bar. final UnitsetBottomBarBackgroundColor(JsonColor bottomBarBackgroundColor)The background color of the bottom shutter-bar. final JsonColorgetBottomBarButtonsColor()The color of the title of all buttons in the bottom shutter-bar (Cancel button, etc.), as well as the camera permission prompt button. final UnitsetBottomBarButtonsColor(JsonColor bottomBarButtonsColor)The color of the title of all buttons in the bottom shutter-bar (Cancel button, etc.), as well as the camera permission prompt button. final JsonCameraModulegetCameraModule()The preferred camera module (default - BACK) final UnitsetCameraModule(JsonCameraModule cameraModule)The preferred camera module (default - BACK) final JsonColorgetCameraBackgroundColor()The color of the camera background (relevant only when the camera preview mode is CameraPreviewMode.FIT_IN). final UnitsetCameraBackgroundColor(JsonColor cameraBackgroundColor)The color of the camera background (relevant only when the camera preview mode is CameraPreviewMode.FIT_IN). final JsonCameraPreviewModegetCameraPreviewMode()Preview mode of the camera. final UnitsetCameraPreviewMode(JsonCameraPreviewMode cameraPreviewMode)Preview mode of the camera. final BooleangetTouchToFocusEnabled()Whether touch-to-focus is enabled on camera preview. final UnitsetTouchToFocusEnabled(Boolean touchToFocusEnabled)Whether touch-to-focus is enabled on camera preview. final StringgetCancelButtonTitle()Title of the cancel button. final UnitsetCancelButtonTitle(String cancelButtonTitle)Title of the cancel button. final JsonImageFilterTypegetDefaultPageFilter()The default image filter type for new documents pages. final UnitsetDefaultPageFilter(JsonImageFilterType defaultPageFilter)The default image filter type for new documents pages. final StringgetEnableCameraButtonTitle()Title of the button that opens the screen where the user can allow the usage of the camera by the app. final UnitsetEnableCameraButtonTitle(String enableCameraButtonTitle)Title of the button that opens the screen where the user can allow the usage of the camera by the app. final StringgetEnableCameraExplanationText()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. final UnitsetEnableCameraExplanationText(String enableCameraExplanationText)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. final BooleangetFlashButtonHidden()Controls whether the flash toggle button is hidden or not. final UnitsetFlashButtonHidden(Boolean flashButtonHidden)Controls whether the flash toggle button is hidden or not. final StringgetFlashButtonTitle()Title of the flash toggle button. final UnitsetFlashButtonTitle(String flashButtonTitle)Title of the flash toggle button. final BooleangetFlashEnabled()Controls whether the flash should be initially enabled. final UnitsetFlashEnabled(Boolean flashEnabled)Controls whether the flash should be initially enabled. final BooleangetForceUserGuidance()Shows the user guidance elements if autosnapping is disabled. final UnitsetForceUserGuidance(Boolean forceUserGuidance)Shows the user guidance elements if autosnapping is disabled. final BooleangetIgnoreOrientationMismatch()Sets whether to ignore the OK_BUT_ORIENTATION_MISMATCH detection status. final UnitsetIgnoreOrientationMismatch(Boolean ignoreOrientationMismatch)Sets whether to ignore the OK_BUT_ORIENTATION_MISMATCH detection status. final DoublegetImageScale()The image scaling factor. final UnitsetImageScale(Double imageScale)The image scaling factor. final BooleangetMultiPageButtonHidden()Controls whether the multi-page toggle button is hidden or not. final UnitsetMultiPageButtonHidden(Boolean multiPageButtonHidden)Controls whether the multi-page toggle button is hidden or not. final StringgetMultiPageButtonTitle()Title of the multi-page mode toggle button. final UnitsetMultiPageButtonTitle(String multiPageButtonTitle)Title of the multi-page mode toggle button. final BooleangetMultiPageEnabled()Controls multi-page mode. final UnitsetMultiPageEnabled(Boolean multiPageEnabled)Controls multi-page mode. final JsonOrientationLockModegetOrientationLockMode()UI Interface orientation lock mode final UnitsetOrientationLockMode(JsonOrientationLockMode orientationLockMode)UI Interface orientation lock mode final StringgetPageCounterButtonTitle()Title suffix of the button that finishes the document scanning when multi-page scanning is enabled. final UnitsetPageCounterButtonTitle(String pageCounterButtonTitle)Title suffix of the button that finishes the document scanning when multi-page scanning is enabled. final JsonCapturePhotoQualityPrioritizationgetPhotoQualityPrioritization()The prioritization of still image quality and capturing speed. final UnitsetPhotoQualityPrioritization(JsonCapturePhotoQualityPrioritization photoQualityPrioritization)The prioritization of still image quality and capturing speed. final JsonColorgetPolygonBackgroundColor()The background color of the detected document outline when the document's angle, size or aspect ratio is not yet sufficiently good. final UnitsetPolygonBackgroundColor(JsonColor polygonBackgroundColor)The background color of the detected document outline when the document's angle, size or aspect ratio is not yet sufficiently good. final JsonColorgetPolygonBackgroundColorOK()The background color of the detected document outline when we are ready to snap OK. final UnitsetPolygonBackgroundColorOK(JsonColor polygonBackgroundColorOK)The background color of the detected document outline when we are ready to snap OK. final JsonColorgetPolygonColor()The color of the detected document outline when the document's angle, size or aspect ratio is not yet sufficiently good. final UnitsetPolygonColor(JsonColor polygonColor)The color of the detected document outline when the document's angle, size or aspect ratio is not yet sufficiently good. final JsonColorgetPolygonColorOK()The color of the detected document outline when we are ready to snap OK. final UnitsetPolygonColorOK(JsonColor polygonColorOK)The color of the detected document outline when we are ready to snap OK. final DoublegetPolygonLineWidth()Width of the detected document outline. final UnitsetPolygonLineWidth(Double polygonLineWidth)Width of the detected document outline. final DoublegetPolygonCornerRadius()The radius to use when drawing rounded corners of the polygon. final UnitsetPolygonCornerRadius(Double polygonCornerRadius)The radius to use when drawing rounded corners of the polygon. final JsonColorgetPolygonAutoSnapProgressColor()Stroke color of polygon auto snap progress animation. final UnitsetPolygonAutoSnapProgressColor(JsonColor polygonAutoSnapProgressColor)Stroke color of polygon auto snap progress animation. final DoublegetPolygonAutoSnapProgressLineWidth()Line width of polygon auto snap progress animation. final UnitsetPolygonAutoSnapProgressLineWidth(Double polygonAutoSnapProgressLineWidth)Line width of polygon auto snap progress animation. final BooleangetPolygonAutoSnapProgressEnabled()Whether polygon auto snap progress animation is enabled or not. final UnitsetPolygonAutoSnapProgressEnabled(Boolean polygonAutoSnapProgressEnabled)Whether polygon auto snap progress animation is enabled or not. final List<JsonAspectRatio>getRequiredAspectRatios()An optional array of aspect ratios the documents have to conform to. final UnitsetRequiredAspectRatios(List<JsonAspectRatio> requiredAspectRatios)An optional array of aspect ratios the documents have to conform to. final JsonColorgetShutterButtonAutoInnerColor()Whether polygon auto snap progress animation is enabled or not. final UnitsetShutterButtonAutoInnerColor(JsonColor shutterButtonAutoInnerColor)Whether polygon auto snap progress animation is enabled or not. final JsonColorgetShutterButtonAutoOuterColor()The background color of the shutter button in auto-snapping mode. final UnitsetShutterButtonAutoOuterColor(JsonColor shutterButtonAutoOuterColor)The background color of the shutter button in auto-snapping mode. final JsonColorgetShutterButtonManualInnerColor()The foreground color of the shutter button in manual mode. final UnitsetShutterButtonManualInnerColor(JsonColor shutterButtonManualInnerColor)The foreground color of the shutter button in manual mode. final JsonColorgetShutterButtonManualOuterColor()The background color of the shutter button in manual mode. final UnitsetShutterButtonManualOuterColor(JsonColor shutterButtonManualOuterColor)The background color of the shutter button in manual mode. final StringgetTextHintBadAngles()Text hint that will be shown when the current detection status is OK_BUT_BAD_ANGLES final UnitsetTextHintBadAngles(String textHintBadAngles)Text hint that will be shown when the current detection status is OK_BUT_BAD_ANGLES final StringgetTextHintBadAspectRatio()Text hint that will be shown when the current detection status is OK_BUT_BAD_ASPECT_RATIO final UnitsetTextHintBadAspectRatio(String textHintBadAspectRatio)Text hint that will be shown when the current detection status is OK_BUT_BAD_ASPECT_RATIO final StringgetTextHintNothingDetected()Text hint that will be shown when the current detection status is ERROR_NOTHING_DETECTED final UnitsetTextHintNothingDetected(String textHintNothingDetected)Text hint that will be shown when the current detection status is ERROR_NOTHING_DETECTED final StringgetTextHintOffCenter()The text being displayed on the user-guidance label, when a document was detected, but its center is too far away from the image center. final UnitsetTextHintOffCenter(String textHintOffCenter)The text being displayed on the user-guidance label, when a document was detected, but its center is too far away from the image center. final StringgetTextHintOK()Text hint that will be shown when the current detection status is OK final UnitsetTextHintOK(String textHintOK)Text hint that will be shown when the current detection status is OK final StringgetTextHintTooDark()Text hint that will be shown when the current detection status is ERROR_TOO_DARK final UnitsetTextHintTooDark(String textHintTooDark)Text hint that will be shown when the current detection status is ERROR_TOO_DARK final StringgetTextHintTooNoisy()Text hint that will be shown when the current detection status is ERROR_TOO_NOISY final UnitsetTextHintTooNoisy(String textHintTooNoisy)Text hint that will be shown when the current detection status is ERROR_TOO_NOISY final StringgetTextHintTooSmall()Text hint that will be shown when the current detection status is OK_BUT_TOO_SMALL final UnitsetTextHintTooSmall(String textHintTooSmall)Text hint that will be shown when the current detection status is OK_BUT_TOO_SMALL final JsonColorgetTopBarBackgroundColor()The background color of the top toolbar. final UnitsetTopBarBackgroundColor(JsonColor topBarBackgroundColor)The background color of the top toolbar. final JsonColorgetTopBarButtonsActiveColor()The color of all active toggle buttons in the toolbar. final UnitsetTopBarButtonsActiveColor(JsonColor topBarButtonsActiveColor)The color of all active toggle buttons in the toolbar. final JsonColorgetTopBarButtonsInactiveColor()The color of all inactive toggle buttons in the toolbar. final UnitsetTopBarButtonsInactiveColor(JsonColor topBarButtonsInactiveColor)The color of all inactive toggle buttons in the toolbar. final JsonColorgetUserGuidanceBackgroundColor()The background color of the user guidance hints. final UnitsetUserGuidanceBackgroundColor(JsonColor userGuidanceBackgroundColor)The background color of the user guidance hints. final JsonColorgetUserGuidanceTextColor()The text color of the user guidance hints. final UnitsetUserGuidanceTextColor(JsonColor userGuidanceTextColor)The text color of the user guidance hints. final DoublegetUserGuidanceFontSize()Font size of the user guidance. final UnitsetUserGuidanceFontSize(Double userGuidanceFontSize)Font size of the user guidance. final JsonSizegetDocumentImageSizeLimit()Limits the maximum size of the document image. final UnitsetDocumentImageSizeLimit(JsonSize documentImageSizeLimit)Limits the maximum size of the document image. final BooleangetShutterButtonHidden()Hides the shutter button if set to TRUE. final UnitsetShutterButtonHidden(Boolean shutterButtonHidden)Hides the shutter button if set to TRUE. final IntegergetMaxNumberOfPages()Maximum number of pages to scan. final UnitsetMaxNumberOfPages(Integer maxNumberOfPages)Maximum number of pages to scan. final BooleangetUseButtonsAllCaps()Controls whether buttons should use all capitals style, as defined by the Android Material Design. final UnitsetUseButtonsAllCaps(Boolean useButtonsAllCaps)Controls whether buttons should use all capitals style, as defined by the Android Material Design. final JsonDocumentScannerAccessibilityConfigurationgetAccessibilityConfiguration()Allows you to customize the accessibility configuration for the Document Scanner UI final UnitsetAccessibilityConfiguration(JsonDocumentScannerAccessibilityConfiguration accessibilityConfiguration)Allows you to customize the accessibility configuration for the Document Scanner UI -
-
Constructor Detail
-
DocumentScannerJsonConfiguration
DocumentScannerJsonConfiguration(String version, String screen, Double acceptedAngleScore, Double acceptedSizeScore, Double acceptedBrightnessThreshold, Boolean autoSnappingButtonHidden, String autoSnappingButtonTitle, Boolean autoSnappingEnabled, Double autoSnappingSensitivity, JsonColor bottomBarBackgroundColor, JsonColor bottomBarButtonsColor, JsonCameraModule cameraModule, JsonColor cameraBackgroundColor, JsonCameraPreviewMode cameraPreviewMode, Boolean touchToFocusEnabled, String cancelButtonTitle, JsonImageFilterType defaultPageFilter, String enableCameraButtonTitle, String enableCameraExplanationText, Boolean flashButtonHidden, String flashButtonTitle, Boolean flashEnabled, Boolean forceUserGuidance, Boolean ignoreOrientationMismatch, Double imageScale, Boolean multiPageButtonHidden, String multiPageButtonTitle, Boolean multiPageEnabled, JsonOrientationLockMode orientationLockMode, String pageCounterButtonTitle, JsonCapturePhotoQualityPrioritization photoQualityPrioritization, JsonColor polygonBackgroundColor, JsonColor polygonBackgroundColorOK, JsonColor polygonColor, JsonColor polygonColorOK, Double polygonLineWidth, Double polygonCornerRadius, JsonColor polygonAutoSnapProgressColor, Double polygonAutoSnapProgressLineWidth, Boolean polygonAutoSnapProgressEnabled, List<JsonAspectRatio> requiredAspectRatios, JsonColor shutterButtonAutoInnerColor, JsonColor shutterButtonAutoOuterColor, JsonColor shutterButtonManualInnerColor, JsonColor shutterButtonManualOuterColor, String textHintBadAngles, String textHintBadAspectRatio, String textHintNothingDetected, String textHintOffCenter, String textHintOK, String textHintTooDark, String textHintTooNoisy, String textHintTooSmall, JsonColor topBarBackgroundColor, JsonColor topBarButtonsActiveColor, JsonColor topBarButtonsInactiveColor, JsonColor userGuidanceBackgroundColor, JsonColor userGuidanceTextColor, Double userGuidanceFontSize, JsonSize documentImageSizeLimit, Boolean shutterButtonHidden, Integer maxNumberOfPages, Boolean useButtonsAllCaps, JsonDocumentScannerAccessibilityConfiguration accessibilityConfiguration)
-
-
Method Detail
-
getVersion
final String getVersion()
A version of the configuration object
-
setVersion
final Unit setVersion(String version)
A version of the configuration object
-
setScreen
final Unit setScreen(String screen)
The configuration object should be applied for this screen
-
getAcceptedAngleScore
final Double getAcceptedAngleScore()
The minimum score in percent (0 - 100) of the perspective distortion to accept a detected document. Default is 75.0.
-
setAcceptedAngleScore
final Unit setAcceptedAngleScore(Double acceptedAngleScore)
The minimum score in percent (0 - 100) of the perspective distortion to accept a detected document. Default is 75.0.
-
getAcceptedSizeScore
final Double getAcceptedSizeScore()
The minimum document width or height in percent (0 - 100) of the screen size to accept a detected document. Default is 80.0.
-
setAcceptedSizeScore
final Unit setAcceptedSizeScore(Double acceptedSizeScore)
The minimum document width or height in percent (0 - 100) of the screen size to accept a detected document. Default is 80.0.
-
getAcceptedBrightnessThreshold
final Double getAcceptedBrightnessThreshold()
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.
-
setAcceptedBrightnessThreshold
final Unit setAcceptedBrightnessThreshold(Double acceptedBrightnessThreshold)
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.
-
getAutoSnappingButtonHidden
final Boolean getAutoSnappingButtonHidden()
Controls whether the auto-snapping toggle button is hidden or not.
-
setAutoSnappingButtonHidden
final Unit setAutoSnappingButtonHidden(Boolean autoSnappingButtonHidden)
Controls whether the auto-snapping toggle button is hidden or not.
-
getAutoSnappingButtonTitle
final String getAutoSnappingButtonTitle()
Title of the auto-snapping toggle button.
-
setAutoSnappingButtonTitle
final Unit setAutoSnappingButtonTitle(String autoSnappingButtonTitle)
Title of the auto-snapping toggle button.
-
getAutoSnappingEnabled
final Boolean getAutoSnappingEnabled()
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.
-
setAutoSnappingEnabled
final Unit setAutoSnappingEnabled(Boolean autoSnappingEnabled)
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.
-
getAutoSnappingSensitivity
final Double getAutoSnappingSensitivity()
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)
-
setAutoSnappingSensitivity
final Unit setAutoSnappingSensitivity(Double autoSnappingSensitivity)
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)
-
getBottomBarBackgroundColor
final JsonColor getBottomBarBackgroundColor()
The background color of the bottom shutter-bar.
-
setBottomBarBackgroundColor
final Unit setBottomBarBackgroundColor(JsonColor bottomBarBackgroundColor)
The background color of the bottom shutter-bar.
-
getBottomBarButtonsColor
final JsonColor getBottomBarButtonsColor()
The color of the title of all buttons in the bottom shutter-bar (Cancel button, etc.), as well as the camera permission prompt button.
-
setBottomBarButtonsColor
final Unit setBottomBarButtonsColor(JsonColor bottomBarButtonsColor)
The color of the title of all buttons in the bottom shutter-bar (Cancel button, etc.), as well as the camera permission prompt button.
-
getCameraModule
final JsonCameraModule getCameraModule()
The preferred camera module (default - BACK)
-
setCameraModule
final Unit setCameraModule(JsonCameraModule cameraModule)
The preferred camera module (default - BACK)
-
getCameraBackgroundColor
final JsonColor getCameraBackgroundColor()
The color of the camera background (relevant only when the camera preview mode is CameraPreviewMode.FIT_IN).
-
setCameraBackgroundColor
final Unit setCameraBackgroundColor(JsonColor cameraBackgroundColor)
The color of the camera background (relevant only when the camera preview mode is CameraPreviewMode.FIT_IN).
-
getCameraPreviewMode
final JsonCameraPreviewMode getCameraPreviewMode()
Preview mode of the camera. Fit-In or Fill-In.
-
setCameraPreviewMode
final Unit setCameraPreviewMode(JsonCameraPreviewMode cameraPreviewMode)
Preview mode of the camera. Fit-In or Fill-In.
-
getTouchToFocusEnabled
final Boolean getTouchToFocusEnabled()
Whether touch-to-focus is enabled on camera preview. Enabled by default. Android only.
-
setTouchToFocusEnabled
final Unit setTouchToFocusEnabled(Boolean touchToFocusEnabled)
Whether touch-to-focus is enabled on camera preview. Enabled by default. Android only.
-
getCancelButtonTitle
final String getCancelButtonTitle()
Title of the cancel button.
-
setCancelButtonTitle
final Unit setCancelButtonTitle(String cancelButtonTitle)
Title of the cancel button.
-
getDefaultPageFilter
final JsonImageFilterType getDefaultPageFilter()
The default image filter type for new documents pages. Defaults to ImageFilterTypeNone.
-
setDefaultPageFilter
final Unit setDefaultPageFilter(JsonImageFilterType defaultPageFilter)
The default image filter type for new documents pages. Defaults to ImageFilterTypeNone.
-
getEnableCameraButtonTitle
final String getEnableCameraButtonTitle()
Title of the button that opens the screen where the user can allow the usage of the camera by the app.
-
setEnableCameraButtonTitle
final Unit setEnableCameraButtonTitle(String enableCameraButtonTitle)
Title of the button that opens the screen where the user can allow the usage of the camera by the app.
-
getEnableCameraExplanationText
final String getEnableCameraExplanationText()
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.
-
setEnableCameraExplanationText
final Unit setEnableCameraExplanationText(String enableCameraExplanationText)
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.
-
getFlashButtonHidden
final Boolean getFlashButtonHidden()
Controls whether the flash toggle button is hidden or not.
-
setFlashButtonHidden
final Unit setFlashButtonHidden(Boolean flashButtonHidden)
Controls whether the flash toggle button is hidden or not.
-
getFlashButtonTitle
final String getFlashButtonTitle()
Title of the flash toggle button.
-
setFlashButtonTitle
final Unit setFlashButtonTitle(String flashButtonTitle)
Title of the flash toggle button.
-
getFlashEnabled
final Boolean getFlashEnabled()
Controls whether the flash should be initially enabled. The default value is FALSE.
-
setFlashEnabled
final Unit setFlashEnabled(Boolean flashEnabled)
Controls whether the flash should be initially enabled. The default value is FALSE.
-
getForceUserGuidance
final Boolean getForceUserGuidance()
Shows the user guidance elements if autosnapping is disabled.
-
setForceUserGuidance
final Unit setForceUserGuidance(Boolean forceUserGuidance)
Shows the user guidance elements if autosnapping is disabled.
-
getIgnoreOrientationMismatch
final Boolean getIgnoreOrientationMismatch()
Sets whether to ignore the OK_BUT_ORIENTATION_MISMATCH detection status. By default OrientationMismatch is not ignored.
-
setIgnoreOrientationMismatch
final Unit setIgnoreOrientationMismatch(Boolean ignoreOrientationMismatch)
Sets whether to ignore the OK_BUT_ORIENTATION_MISMATCH detection status. By default OrientationMismatch is not ignored.
-
getImageScale
final Double getImageScale()
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.
-
setImageScale
final Unit setImageScale(Double imageScale)
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.
-
getMultiPageButtonHidden
final Boolean getMultiPageButtonHidden()
Controls whether the multi-page toggle button is hidden or not.
-
setMultiPageButtonHidden
final Unit setMultiPageButtonHidden(Boolean multiPageButtonHidden)
Controls whether the multi-page toggle button is hidden or not.
-
getMultiPageButtonTitle
final String getMultiPageButtonTitle()
Title of the multi-page mode toggle button.
-
setMultiPageButtonTitle
final Unit setMultiPageButtonTitle(String multiPageButtonTitle)
Title of the multi-page mode toggle button.
-
getMultiPageEnabled
final Boolean getMultiPageEnabled()
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.
-
setMultiPageEnabled
final Unit setMultiPageEnabled(Boolean multiPageEnabled)
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.
-
getOrientationLockMode
final JsonOrientationLockMode getOrientationLockMode()
UI Interface orientation lock mode
-
setOrientationLockMode
final Unit setOrientationLockMode(JsonOrientationLockMode orientationLockMode)
UI Interface orientation lock mode
-
getPageCounterButtonTitle
final String getPageCounterButtonTitle()
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.
-
setPageCounterButtonTitle
final Unit setPageCounterButtonTitle(String pageCounterButtonTitle)
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.
-
getPhotoQualityPrioritization
final JsonCapturePhotoQualityPrioritization getPhotoQualityPrioritization()
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. Note: Has no effect on devices prior to iOS 13.0!. iOS only.
-
setPhotoQualityPrioritization
final Unit setPhotoQualityPrioritization(JsonCapturePhotoQualityPrioritization photoQualityPrioritization)
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. Note: Has no effect on devices prior to iOS 13.0!. iOS only.
-
getPolygonBackgroundColor
final JsonColor getPolygonBackgroundColor()
The background color of the detected document outline when the document's angle, size or aspect ratio is not yet sufficiently good. (All net.doo.snap.lib.detector.DetectionResult with OK_BUT_XXX).
-
setPolygonBackgroundColor
final Unit setPolygonBackgroundColor(JsonColor polygonBackgroundColor)
The background color of the detected document outline when the document's angle, size or aspect ratio is not yet sufficiently good. (All net.doo.snap.lib.detector.DetectionResult with OK_BUT_XXX).
-
getPolygonBackgroundColorOK
final JsonColor getPolygonBackgroundColorOK()
The background color of the detected document outline when we are ready to snap OK.
-
setPolygonBackgroundColorOK
final Unit setPolygonBackgroundColorOK(JsonColor polygonBackgroundColorOK)
The background color of the detected document outline when we are ready to snap OK.
-
getPolygonColor
final JsonColor getPolygonColor()
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 net.doo.snap.lib.detector.DetectionResult that have the OK_BUT_XXX prefix).
-
setPolygonColor
final Unit setPolygonColor(JsonColor polygonColor)
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 net.doo.snap.lib.detector.DetectionResult that have the OK_BUT_XXX prefix).
-
getPolygonColorOK
final JsonColor getPolygonColorOK()
The color of the detected document outline when we are ready to snap OK.
-
setPolygonColorOK
final Unit setPolygonColorOK(JsonColor polygonColorOK)
The color of the detected document outline when we are ready to snap OK.
-
getPolygonLineWidth
final Double getPolygonLineWidth()
Width of the detected document outline.
-
setPolygonLineWidth
final Unit setPolygonLineWidth(Double polygonLineWidth)
Width of the detected document outline.
-
getPolygonCornerRadius
final Double getPolygonCornerRadius()
The radius to use when drawing rounded corners of the polygon. Default is 8.0.
-
setPolygonCornerRadius
final Unit setPolygonCornerRadius(Double polygonCornerRadius)
The radius to use when drawing rounded corners of the polygon. Default is 8.0.
-
getPolygonAutoSnapProgressColor
final JsonColor getPolygonAutoSnapProgressColor()
Stroke color of polygon auto snap progress animation. Default is green. Can't be nil.
-
setPolygonAutoSnapProgressColor
final Unit setPolygonAutoSnapProgressColor(JsonColor polygonAutoSnapProgressColor)
Stroke color of polygon auto snap progress animation. Default is green. Can't be nil.
-
getPolygonAutoSnapProgressLineWidth
final Double getPolygonAutoSnapProgressLineWidth()
Line width of polygon auto snap progress animation. Default is 5.0.
-
setPolygonAutoSnapProgressLineWidth
final Unit setPolygonAutoSnapProgressLineWidth(Double polygonAutoSnapProgressLineWidth)
Line width of polygon auto snap progress animation. Default is 5.0.
-
getPolygonAutoSnapProgressEnabled
final Boolean getPolygonAutoSnapProgressEnabled()
Whether polygon auto snap progress animation is enabled or not. Default is true.
-
setPolygonAutoSnapProgressEnabled
final Unit setPolygonAutoSnapProgressEnabled(Boolean polygonAutoSnapProgressEnabled)
Whether polygon auto snap progress animation is enabled or not. Default is true.
-
getRequiredAspectRatios
final List<JsonAspectRatio> getRequiredAspectRatios()
An optional array of aspect ratios the documents have to conform to.
-
setRequiredAspectRatios
final Unit setRequiredAspectRatios(List<JsonAspectRatio> requiredAspectRatios)
An optional array of aspect ratios the documents have to conform to.
-
getShutterButtonAutoInnerColor
final JsonColor getShutterButtonAutoInnerColor()
Whether polygon auto snap progress animation is enabled or not. Default is true.
-
setShutterButtonAutoInnerColor
final Unit setShutterButtonAutoInnerColor(JsonColor shutterButtonAutoInnerColor)
Whether polygon auto snap progress animation is enabled or not. Default is true.
-
getShutterButtonAutoOuterColor
final JsonColor getShutterButtonAutoOuterColor()
The background color of the shutter button in auto-snapping mode.
-
setShutterButtonAutoOuterColor
final Unit setShutterButtonAutoOuterColor(JsonColor shutterButtonAutoOuterColor)
The background color of the shutter button in auto-snapping mode.
-
getShutterButtonManualInnerColor
final JsonColor getShutterButtonManualInnerColor()
The foreground color of the shutter button in manual mode.
-
setShutterButtonManualInnerColor
final Unit setShutterButtonManualInnerColor(JsonColor shutterButtonManualInnerColor)
The foreground color of the shutter button in manual mode.
-
getShutterButtonManualOuterColor
final JsonColor getShutterButtonManualOuterColor()
The background color of the shutter button in manual mode.
-
setShutterButtonManualOuterColor
final Unit setShutterButtonManualOuterColor(JsonColor shutterButtonManualOuterColor)
The background color of the shutter button in manual mode.
-
getTextHintBadAngles
final String getTextHintBadAngles()
Text hint that will be shown when the current detection status is OK_BUT_BAD_ANGLES
-
setTextHintBadAngles
final Unit setTextHintBadAngles(String textHintBadAngles)
Text hint that will be shown when the current detection status is OK_BUT_BAD_ANGLES
-
getTextHintBadAspectRatio
final String getTextHintBadAspectRatio()
Text hint that will be shown when the current detection status is OK_BUT_BAD_ASPECT_RATIO
-
setTextHintBadAspectRatio
final Unit setTextHintBadAspectRatio(String textHintBadAspectRatio)
Text hint that will be shown when the current detection status is OK_BUT_BAD_ASPECT_RATIO
-
getTextHintNothingDetected
final String getTextHintNothingDetected()
Text hint that will be shown when the current detection status is ERROR_NOTHING_DETECTED
-
setTextHintNothingDetected
final Unit setTextHintNothingDetected(String textHintNothingDetected)
Text hint that will be shown when the current detection status is ERROR_NOTHING_DETECTED
-
getTextHintOffCenter
final String getTextHintOffCenter()
The text being displayed on the user-guidance label, when a document was detected, but its center is too far away from the image center.
-
setTextHintOffCenter
final Unit setTextHintOffCenter(String textHintOffCenter)
The text being displayed on the user-guidance label, when a document was detected, but its center is too far away from the image center.
-
getTextHintOK
final String getTextHintOK()
Text hint that will be shown when the current detection status is OK
-
setTextHintOK
final Unit setTextHintOK(String textHintOK)
Text hint that will be shown when the current detection status is OK
-
getTextHintTooDark
final String getTextHintTooDark()
Text hint that will be shown when the current detection status is ERROR_TOO_DARK
-
setTextHintTooDark
final Unit setTextHintTooDark(String textHintTooDark)
Text hint that will be shown when the current detection status is ERROR_TOO_DARK
-
getTextHintTooNoisy
final String getTextHintTooNoisy()
Text hint that will be shown when the current detection status is ERROR_TOO_NOISY
-
setTextHintTooNoisy
final Unit setTextHintTooNoisy(String textHintTooNoisy)
Text hint that will be shown when the current detection status is ERROR_TOO_NOISY
-
getTextHintTooSmall
final String getTextHintTooSmall()
Text hint that will be shown when the current detection status is OK_BUT_TOO_SMALL
-
setTextHintTooSmall
final Unit setTextHintTooSmall(String textHintTooSmall)
Text hint that will be shown when the current detection status is OK_BUT_TOO_SMALL
-
getTopBarBackgroundColor
final JsonColor getTopBarBackgroundColor()
The background color of the top toolbar.
-
setTopBarBackgroundColor
final Unit setTopBarBackgroundColor(JsonColor topBarBackgroundColor)
The background color of the top toolbar.
-
getTopBarButtonsActiveColor
final JsonColor getTopBarButtonsActiveColor()
The color of all active toggle buttons in the toolbar.
-
setTopBarButtonsActiveColor
final Unit setTopBarButtonsActiveColor(JsonColor topBarButtonsActiveColor)
The color of all active toggle buttons in the toolbar.
-
getTopBarButtonsInactiveColor
final JsonColor getTopBarButtonsInactiveColor()
The color of all inactive toggle buttons in the toolbar.
-
setTopBarButtonsInactiveColor
final Unit setTopBarButtonsInactiveColor(JsonColor topBarButtonsInactiveColor)
The color of all inactive toggle buttons in the toolbar.
-
getUserGuidanceBackgroundColor
final JsonColor getUserGuidanceBackgroundColor()
The background color of the user guidance hints.
-
setUserGuidanceBackgroundColor
final Unit setUserGuidanceBackgroundColor(JsonColor userGuidanceBackgroundColor)
The background color of the user guidance hints.
-
getUserGuidanceTextColor
final JsonColor getUserGuidanceTextColor()
The text color of the user guidance hints.
-
setUserGuidanceTextColor
final Unit setUserGuidanceTextColor(JsonColor userGuidanceTextColor)
The text color of the user guidance hints.
-
getUserGuidanceFontSize
final Double getUserGuidanceFontSize()
Font size of the user guidance. Default is 17.0.
-
setUserGuidanceFontSize
final Unit setUserGuidanceFontSize(Double userGuidanceFontSize)
Font size of the user guidance. Default is 17.0.
-
getDocumentImageSizeLimit
final JsonSize getDocumentImageSizeLimit()
Limits the maximum size of the document image. If width or height are zero, this property is effectively ignored.
-
setDocumentImageSizeLimit
final Unit setDocumentImageSizeLimit(JsonSize documentImageSizeLimit)
Limits the maximum size of the document image. If width or height are zero, this property is effectively ignored.
-
getShutterButtonHidden
final Boolean getShutterButtonHidden()
Hides the shutter button if set to TRUE. Shows it otherwise. Defaults to FALSE. If set to TRUE, auto-snapping is enabled and the property autoSnappingEnabled of the behaviour configuration will have no effect. Also the auto-snapping button will be hidden.
-
setShutterButtonHidden
final Unit setShutterButtonHidden(Boolean shutterButtonHidden)
Hides the shutter button if set to TRUE. Shows it otherwise. Defaults to FALSE. If set to TRUE, auto-snapping is enabled and the property autoSnappingEnabled of the behaviour configuration will have no effect. Also the auto-snapping button will be hidden.
-
getMaxNumberOfPages
final Integer getMaxNumberOfPages()
Maximum number of pages to scan. Ignored when set to null, or when
multiPageEnabledis FALSE. Default value is null.
-
setMaxNumberOfPages
final Unit setMaxNumberOfPages(Integer maxNumberOfPages)
Maximum number of pages to scan. Ignored when set to null, or when
multiPageEnabledis FALSE. Default value is null.
-
getUseButtonsAllCaps
final Boolean getUseButtonsAllCaps()
Controls whether buttons should use all capitals style, as defined by the Android Material Design. Defaults to TRUE. Android only.
-
setUseButtonsAllCaps
final Unit setUseButtonsAllCaps(Boolean useButtonsAllCaps)
Controls whether buttons should use all capitals style, as defined by the Android Material Design. Defaults to TRUE. Android only.
-
getAccessibilityConfiguration
final JsonDocumentScannerAccessibilityConfiguration getAccessibilityConfiguration()
Allows you to customize the accessibility configuration for the Document Scanner UI
-
setAccessibilityConfiguration
final Unit setAccessibilityConfiguration(JsonDocumentScannerAccessibilityConfiguration accessibilityConfiguration)
Allows you to customize the accessibility configuration for the Document Scanner UI
-
-
-
-