public class BarcodeScannerConfiguration
Class which is used to configure io.scanbot.sdk.ui.view.barcode.BarcodeScannerActivity Contains settings indicating views Behaviour, Texts and Appearance
public BarcodeScannerConfiguration()
Class which is used to configure io.scanbot.sdk.ui.view.barcode.BarcodeScannerActivity Contains settings indicating views Behaviour, Texts and Appearance
@NotNull public java.util.Map<java.lang.String,java.io.Serializable> getBarcodeCameraConfiguration()
public void setBarcodeFormatsFilter(@NotNull
java.util.ArrayList<io.scanbot.sdk.barcode.entity.BarcodeFormat> barcodeFormat)
A list of barcodes that the scanner should recognize. Anything not on the list will not trigger a detection.
By default, all supported barcode formats will be recognized.
public void setAcceptedDocumentFormats(@NotNull
java.util.ArrayList<io.scanbot.sdk.barcode.entity.BarcodeDocumentFormat> documentFormats)
A list of document formats that the scanner should recognize. Anything not on the list will not trigger a detection.
By default, all supported barcode document formats will be recognized.
public void setDetectorType(@NotNull
io.scanbot.sdk.barcode.BarcodeDetectorType type)
Allows to set custom detector type for the barcode detection BarcodeDetectorType.ML_BASED is used by default and uses ML mechanisms to detect the barcode on the frame or BarcodeDetectorType.PLAIN if it is needed to scan just one QR code or PDF-417 which is clearly visible it might work much faster
type - of the detector to usepublic void setDelayAfterFocusCompleteMs(long delay)
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.
public void setBarcodeImageGenerationType(@NotNull
BarcodeImageGenerationType imageType)
Specifies the way of barcode images generation or disables this generation at all. Use, if you want to receive a full sized image with barcodes.
Defaults to BarcodeImageGenerationType.NONE.
public void setFlashEnabled(boolean flashEnabled)
Controls whether the flash should be initially enabled. The default value is FALSE.
public void setOrientationLockMode(@NotNull
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 setSuccessBeepEnabled(boolean successBeepEnabled)
Controls whether to play a beep sound after a successful detection. Default value is TRUE.
public void setCameraModule(@NotNull
io.scanbot.sdk.camera.CameraModule cameraModule)
Set supported camera module: CameraModule.BACK, CameraModule.FRONT or others. Optional. By default is CameraModule.BACK.
public void setCameraZoomFactor(float zoomFactor)
Set current zoom by a linear zoom value ranging from 0f to 1.0f. Optical Zoom Level 0f represents the minimum zoom while Optical Zoom Level 1.0f represents the maximum zoom. Default value is 0f.
zoomFactor - Target zoom levelpublic void setCameraZoomRange(@NotNull
io.scanbot.sdk.camera.ZoomRange zoomRange)
Set custom camera zoom range. Min value 0f and max value 1.0f. Default value is ZoomRange0f,1f.
public void setTopBarBackgroundColor(int topBarBackgroundColor)
Background color of the top toolbar.
public void setTopBarButtonsColor(int topBarButtonsColor)
Color of the titles of all buttons in the top toolbar.
public void setTopBarButtonsInactiveColor(int topBarButtonsInactiveColor)
The color of the inactive flash button in the toolbar.
public void setCameraOverlayColor(int cameraOverlayColor)
Background color outside of the finder window.
public void setFinderLineWidth(int finderLineWidth)
Thickness of the finder window's outline.
public void setFinderAspectRatio(@NotNull
io.scanbot.sdk.ui.camera.FinderAspectRatio finderAspectRatio)
Aspect ratio of the finder window.
public void setFinderLineColor(int finderLineColor)
Color of the finder window's outline.
public void setFinderTextHintColor(int finderTextHintColor)
Color of the text hint under the finder window.
public void setCancelButtonTitle(@NotNull
java.lang.String cancelButtonTitle)
Title of the cancel button.
public void setFinderTextHint(@NotNull
java.lang.String finderTextHint)
Text hint shown under the finder window.
public void setEnableCameraExplanationText(@NotNull
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(@NotNull
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.
public void setUseButtonsAllCaps(boolean allCaps)
Controls whether buttons should use all capitals style
public void setAutoCancelTimeout(int seconds)
Sets auto close timer in seconds. 0 = disabled and it is the default value
public void setAdditionalDetectionParameters(@NotNull
BarcodeScannerAdditionalConfiguration additionalConfiguration)
Sets additional configuration for BarcodeDetector to further tweak it's logic.
NOTE: these parameters are not intended to be modified unless needed.
Documentation and default values can be seen in class BarcodeScannerAdditionalConfiguration.