public class DocumentScannerConfiguration
Class which is used to configure class DocumentScannerActivity
Contains settings indicating views Behaviour, Texts and Appearance
class DocumentScannerActivity| Constructor and Description |
|---|
DocumentScannerConfiguration()
Class which is used to configure
class DocumentScannerActivity
Contains settings indicating views Behaviour, Texts and Appearance |
| Modifier and Type | Method and Description |
|---|---|
java.util.Map<java.lang.String,java.io.Serializable> |
getCameraConfiguration() |
void |
setAcceptedAngleScore(double acceptedAngleScore)
The minimum score in percent (0 - 100) of the perspective distortion to accept a detected document.
Default is 75.0.
|
void |
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.
|
void |
setAutoSnappingButtonHidden(boolean autoSnappingButtonHidden)
Controls whether the auto-snapping toggle button is hidden or not.
|
void |
setAutoSnappingButtonTitle(java.lang.String autoSnappingButtonTitle)
Title of the auto-snapping toggle button.
|
void |
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.
|
void |
setAutoSnappingSensitivity(float 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)
|
void |
setBottomBarBackgroundColor(int bottomBarBackgroundColor)
The background color of the bottom shutter-bar.
|
void |
setBottomBarButtonsColor(int 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.
|
void |
setCameraBackgroundColor(int cameraBackgroundColor)
The color of the camera background (relevant only when the camera preview mode is CameraPreviewMode.FIT_IN).
|
void |
setCameraPreviewMode(net.doo.snap.camera.CameraPreviewMode cameraPreviewMode)
Preview mode of the camera: Fit-In or Fill-In.
Optional, default is Fit-In.
|
void |
setCancelButtonTitle(java.lang.String cancelButtonTitle)
Title of the cancel button.
|
void |
setEnableCameraButtonTitle(java.lang.String enableCameraButtonTitle)
Title of the button that opens the screen where the user can allow
the usage of the camera by the app.
|
void |
setEnableCameraExplanationText(java.lang.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.
|
void |
setFlashButtonHidden(boolean flashButtonHidden)
Controls whether the flash toggle button is hidden or not.
|
void |
setFlashButtonTitle(java.lang.String flashButtonTitle)
Title of the flash toggle button.
|
void |
setFlashEnabled(boolean flashEnabled)
Controls whether the flash should be initially enabled.
The default value is FALSE.
|
void |
setIgnoreBadAspectRatio(boolean ignoreBadAspectRatio)
Sets whether to ignore the net.doo.snap.lib.detector.DetectionResult.OK_BUT_BAD_ASPECT_RATIO detection status.
By default BadAspectRatio is not ignored.
|
void |
setImageScale(float 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.
|
void |
setMultiPageButtonHidden(boolean multiPageButtonHidden)
Controls whether the multi-page toggle button is hidden or not.
|
void |
setMultiPageButtonTitle(java.lang.String multiPageButtonTitle)
Title of the multi-page mode toggle button.
|
void |
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.
|
void |
setOrientationLockMode(io.scanbot.sdk.ui.view.base.configuration.CameraOrientationMode cameraOrientationMode)
Orientation lock mode of the camera: PORTRAIT or LANDSCAPE.
By default the camera orientation is not locked.
|
void |
setPageCounterButtonTitle(java.lang.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.
|
void |
setPolygonBackgroundColor(int 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).
|
void |
setPolygonBackgroundColorOK(int polygonBackgroundColorOK)
The background color of the detected document outline when we are ready to snap net.doo.snap.lib.detector.DetectionResult.OK.
|
void |
setPolygonColor(int 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).
|
void |
setPolygonColorOK(int polygonColorOK)
The color of the detected document outline when we are ready to snap net.doo.snap.lib.detector.DetectionResult.OK.
|
void |
setPolygonLineWidth(int polygonLineWidth)
Width of the detected document outline.
|
void |
setShutterButtonAutoInnerColor(int shutterButtonAutoInnerColor)
The foreground color of the shutter button in auto-snapping mode.
|
void |
setShutterButtonAutoOuterColor(int shutterButtonAutoOuterColor)
The background color of the shutter button in auto-snapping mode.
|
void |
setShutterButtonManualInnerColor(int shutterButtonManualInnerColor)
The foreground color of the shutter button in manual mode.
|
void |
setShutterButtonManualOuterColor(int shutterButtonManualOuterColor)
The background color of the shutter button in manual mode.
|
void |
setTextHintBadAngles(java.lang.String textBadAngles)
Text hint that will be shown when the current detection status is net.doo.snap.lib.detector.DetectionResult.OK_BUT_BAD_ANGLES
|
void |
setTextHintBadAspectRatio(java.lang.String textHintBadAspectRatio)
Text hint that will be shown when the current detection status is net.doo.snap.lib.detector.DetectionResult.OK_BUT_BAD_ASPECT_RATIO
|
void |
setTextHintNothingDetected(java.lang.String textHintNothingDetected)
Text hint that will be shown when the current detection status is net.doo.snap.lib.detector.DetectionResult.ERROR_NOTHING_DETECTED
|
void |
setTextHintOK(java.lang.String textHintDontMove)
Text hint that will be shown when the current detection status is net.doo.snap.lib.detector.DetectionResult.OK
|
void |
setTextHintTooDark(java.lang.String textHintTooDark)
Text hint that will be shown when the current detection status is net.doo.snap.lib.detector.DetectionResult.ERROR_TOO_DARK
|
void |
setTextHintTooNoisy(java.lang.String textHintTooNoisy)
Text hint that will be shown when the current detection status is net.doo.snap.lib.detector.DetectionResult.ERROR_TOO_NOISY
|
void |
setTextHintTooSmall(java.lang.String textHintTooSmall)
Text hint that will be shown when the current detection status is net.doo.snap.lib.detector.DetectionResult.OK_BUT_TOO_SMALL
|
void |
setTopBarBackgroundColor(int topBarBackgroundColor)
The background color of the top toolbar.
|
void |
setTopBarButtonsActiveColor(int topBarButtonsActiveColor)
The color of all active toggle buttons in the toolbar.
|
void |
setTopBarButtonsInactiveColor(int topBarButtonsInactiveColor)
The color of all inactive toggle buttons in the toolbar.
|
void |
setUserGuidanceBackgroundColor(int userGuidanceBackgroundColor)
The background color of the user guidance hints.
|
void |
setUserGuidanceTextColor(int userGuidanceTextColor)
The text color of the user guidance hints.
|
public DocumentScannerConfiguration()
Class which is used to configure class DocumentScannerActivity
Contains settings indicating views Behaviour, Texts and Appearance
class DocumentScannerActivitypublic java.util.Map<java.lang.String,java.io.Serializable> getCameraConfiguration()
public void 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.
When auto-snapping is disabled, the user must manually take a photo by tapping the shutter button.
The default value is TRUE.
public void setFlashEnabled(boolean flashEnabled)
Controls whether the flash should be initially enabled. The default value is FALSE.
public void 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.
public void setAutoSnappingSensitivity(float 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)
public void setCameraPreviewMode(net.doo.snap.camera.CameraPreviewMode cameraPreviewMode)
Preview mode of the camera: Fit-In or Fill-In. Optional, default is Fit-In.
public void setOrientationLockMode(io.scanbot.sdk.ui.view.base.configuration.CameraOrientationMode cameraOrientationMode)
Orientation lock mode of the camera: PORTRAIT or LANDSCAPE. By default the camera orientation is not locked.
public void setIgnoreBadAspectRatio(boolean ignoreBadAspectRatio)
Sets whether to ignore the net.doo.snap.lib.detector.DetectionResult.OK_BUT_BAD_ASPECT_RATIO detection status. By default BadAspectRatio is not ignored.
public void setAcceptedAngleScore(double acceptedAngleScore)
The minimum score in percent (0 - 100) of the perspective distortion to accept a detected document. Default is 75.0.
public void 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.
public void setImageScale(float 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.
public void setPolygonColor(int 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).
public void setPolygonColorOK(int polygonColorOK)
The color of the detected document outline when we are ready to snap net.doo.snap.lib.detector.DetectionResult.OK.
public void setPolygonLineWidth(int polygonLineWidth)
Width of the detected document outline.
public void setPolygonBackgroundColor(int 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).
public void setPolygonBackgroundColorOK(int polygonBackgroundColorOK)
The background color of the detected document outline when we are ready to snap net.doo.snap.lib.detector.DetectionResult.OK.
public void setShutterButtonAutoOuterColor(int shutterButtonAutoOuterColor)
The background color of the shutter button in auto-snapping mode.
public void setShutterButtonAutoInnerColor(int shutterButtonAutoInnerColor)
The foreground color of the shutter button in auto-snapping mode.
public void setShutterButtonManualOuterColor(int shutterButtonManualOuterColor)
The background color of the shutter button in manual mode.
public void setShutterButtonManualInnerColor(int shutterButtonManualInnerColor)
The foreground color of the shutter button in manual mode.
public void setUserGuidanceBackgroundColor(int userGuidanceBackgroundColor)
The background color of the user guidance hints.
public void setUserGuidanceTextColor(int userGuidanceTextColor)
The text color of the user guidance hints.
public void setTopBarBackgroundColor(int topBarBackgroundColor)
The background color of the top toolbar.
public void setTopBarButtonsActiveColor(int topBarButtonsActiveColor)
The color of all active toggle buttons in the toolbar.
public void setTopBarButtonsInactiveColor(int topBarButtonsInactiveColor)
The color of all inactive toggle buttons in the toolbar.
public void setBottomBarBackgroundColor(int bottomBarBackgroundColor)
The background color of the bottom shutter-bar.
public void setBottomBarButtonsColor(int 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.
public void setCameraBackgroundColor(int cameraBackgroundColor)
The color of the camera background (relevant only when the camera preview mode is CameraPreviewMode.FIT_IN).
public void setMultiPageButtonHidden(boolean multiPageButtonHidden)
Controls whether the multi-page toggle button is hidden or not.
public void setFlashButtonHidden(boolean flashButtonHidden)
Controls whether the flash toggle button is hidden or not.
public void setAutoSnappingButtonHidden(boolean autoSnappingButtonHidden)
Controls whether the auto-snapping toggle button is hidden or not.
public void setCancelButtonTitle(java.lang.String cancelButtonTitle)
Title of the cancel button.
public void setPageCounterButtonTitle(java.lang.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.
public void setTextHintOK(java.lang.String textHintDontMove)
Text hint that will be shown when the current detection status is net.doo.snap.lib.detector.DetectionResult.OK
public void setTextHintTooSmall(java.lang.String textHintTooSmall)
Text hint that will be shown when the current detection status is net.doo.snap.lib.detector.DetectionResult.OK_BUT_TOO_SMALL
public void setTextHintBadAngles(java.lang.String textBadAngles)
Text hint that will be shown when the current detection status is net.doo.snap.lib.detector.DetectionResult.OK_BUT_BAD_ANGLES
public void setTextHintBadAspectRatio(java.lang.String textHintBadAspectRatio)
Text hint that will be shown when the current detection status is net.doo.snap.lib.detector.DetectionResult.OK_BUT_BAD_ASPECT_RATIO
public void setTextHintNothingDetected(java.lang.String textHintNothingDetected)
Text hint that will be shown when the current detection status is net.doo.snap.lib.detector.DetectionResult.ERROR_NOTHING_DETECTED
public void setTextHintTooNoisy(java.lang.String textHintTooNoisy)
Text hint that will be shown when the current detection status is net.doo.snap.lib.detector.DetectionResult.ERROR_TOO_NOISY
public void setTextHintTooDark(java.lang.String textHintTooDark)
Text hint that will be shown when the current detection status is net.doo.snap.lib.detector.DetectionResult.ERROR_TOO_DARK
public void setMultiPageButtonTitle(java.lang.String multiPageButtonTitle)
Title of the multi-page mode toggle button.
public void setFlashButtonTitle(java.lang.String flashButtonTitle)
Title of the flash toggle button.
public void setAutoSnappingButtonTitle(java.lang.String autoSnappingButtonTitle)
Title of the auto-snapping toggle button.
public void setEnableCameraExplanationText(java.lang.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.
public void setEnableCameraButtonTitle(java.lang.String enableCameraButtonTitle)
Title of the button that opens the screen where the user can allow the usage of the camera by the app.