Class BatchBarcodeScannerConfiguration
-
- All Implemented Interfaces:
public final class BatchBarcodeScannerConfigurationClass which is used to configure BatchBarcodeScannerActivity. Contains settings indicating views Behaviour, Texts and Appearance.
-
-
Nested Class Summary
Nested Classes Modifier and Type Class Description public classBatchBarcodeScannerConfiguration.Companion
-
Field Summary
Fields Modifier and Type Field Description private final BatchBarcodeScannerJsonConfigurationparamsprivate final BatchBarcodeScannerNativeConfigurationnativeParamspublic final static BatchBarcodeScannerConfiguration.CompanionCompanion
-
Constructor Summary
Constructors Constructor Description BatchBarcodeScannerConfiguration()
-
Method Summary
Modifier and Type Method Description final BatchBarcodeScannerJsonConfigurationgetParams()final BatchBarcodeScannerNativeConfigurationgetNativeParams()final UnitsetClearButtonTitle(String clearButtonTitle)Text of the button which clears the list of scanned barcodes. final UnitsetNoBarcodesTitle(String noBarcodesTitle)Text of the message that there are no barcodes scanned. final UnitsetSubmitButtonTitle(String submitButtonTitle)Text of the button which finishes the flow. final UnitsetDetailsBackgroundColor(Integer color)The color of bottom sheet. final UnitsetDetailsPrimaryColor(Integer color)The color of text elements in bottom sheet. final UnitsetDetailsActionColor(Integer color)The color of Submit button. final UnitsetBarcodesCountText(String placeholder)The placeholder for barcodes count text. final UnitsetBarcodesCountTextColor(Integer color)The color for barcodes count text. final UnitsetFetchingStateText(String text)The text for the data fetching state of the barcode item in a list. final UnitsetBarcodeFilter(IBarcodeFilter barcodeFilter)Additional filter to reject or accept barcode scanner results. final UnitsetBarcodeFormatsFilter(List<BarcodeFormat> barcodeFormat)A list of barcodes that the scanner should recognize. final UnitsetFormattedBarcodeDataMapper(FormattedBarcodeDataMapper dataMapper)Additional filter to reject or accept barcode scanner results. final UnitsetSuccessfulScanningInterval(Long scanningIntervalInMs)Set an interval between successful scanned frames in milliseconds. final UnitsetEngineMode(BarcodeScannerEngineMode engineMode)Allows to set custom BarcodeScannerEngineMode for the barcode scanning. final UnitsetAcceptedDocumentFormats(ArrayList<BarcodeDocumentFormat> documentFormats)A list of document formats that the scanner should recognize. final UnitsetFlashEnabled(Boolean flashEnabled)Controls whether the flash should be initially enabled. final UnitsetOrientationLockMode(CameraOrientationMode cameraOrientationMode)Orientation lock mode of the camera: CameraOrientationMode.PORTRAIT or CameraOrientationMode.LANDSCAPE. final UnitsetSuccessBeepEnabled(Boolean successBeepEnabled)Controls whether to play a beep sound after a successful scanning. final UnitsetTopBarBackgroundColor(Integer topBarBackgroundColor)Background color of the top toolbar. final UnitsetTopBarButtonsColor(Integer topBarButtonsColor)Color of the titles of all buttons in the top toolbar. final UnitsetTopBarButtonsInactiveColor(Integer topBarButtonsInactiveColor)The color of the inactive flash button in the toolbar. final UnitsetCameraOverlayColor(Integer cameraOverlayColor)Background color outside of the finder window. final UnitsetViewFinderEnabled(Boolean viewFinderEnabled)Set trueto enable showing the area of interest on camera preview.final UnitsetFinderAspectRatio(AspectRatio finderAspectRatio)Aspect ratio of the finder window. final UnitsetFinderLineWidth(Integer finderLineWidth)Thickness of the finder window's outline in Px. final UnitsetFinderLineColor(Integer finderLineColor)Color of the finder window's outline. final UnitsetFinderTextHintColor(Integer finderTextHintColor)Color of the text hint under the finder window. final UnitsetUseButtonsAllCaps(Boolean allCaps)Controls whether buttons should use all capitals style. final UnitsetAutoCancelTimeout(Integer seconds)Sets auto close timer in seconds. final UnitsetCameraZoomRatio(Float zoomRatio)Set current zoom ratio from 0.5x up to 100x (if supported). final UnitsetCameraZoomRange(ZoomRange zoomRange)Set custom camera zoom range. final UnitsetCameraModule(CameraModule cameraModule)Set supported camera module: CameraModule.BACK, CameraModule.FRONT or others. final UnitsetCameraPreviewMode(CameraPreviewMode cameraPreviewMode)Preview mode of the camera: Fit-In or Fill-In. final UnitsetMinFocusDistanceLock(Boolean lock)Locks the minimal supported focus distance and disables a continuous focus final UnitsetCancelButtonTitle(String cancelButtonTitle)Title of the cancel button. final UnitsetCancelButtonIcon(Integer cancelButtonIcon)Icon of the cancel button. final UnitsetFinderTextHint(String finderTextHint)Text hint shown under the finder window. 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 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 UnitsetAdditionalScanningParameters(BarcodeScannerAdditionalConfiguration additionalConfiguration)Sets additional configuration for BarcodeScanner to further tweak it's logic. final UnitsetSelectionOverlayConfiguration(SelectionOverlayConfiguration configuration)Controls the state of the Barcode selection overlay. final UnitsetInitialScanDelayMs(Long milliseconds)Sets initial scan delay in ms. final UnitsetTouchToFocusEnabled(Boolean enabled)Controls whether the touch to focus feature should be enabled. -
-
Method Detail
-
getParams
final BatchBarcodeScannerJsonConfiguration getParams()
-
getNativeParams
final BatchBarcodeScannerNativeConfiguration getNativeParams()
-
setClearButtonTitle
final Unit setClearButtonTitle(String clearButtonTitle)
Text of the button which clears the list of scanned barcodes.
-
setNoBarcodesTitle
final Unit setNoBarcodesTitle(String noBarcodesTitle)
Text of the message that there are no barcodes scanned.
-
setSubmitButtonTitle
final Unit setSubmitButtonTitle(String submitButtonTitle)
Text of the button which finishes the flow.
-
setDetailsBackgroundColor
final Unit setDetailsBackgroundColor(Integer color)
The color of bottom sheet.
-
setDetailsPrimaryColor
final Unit setDetailsPrimaryColor(Integer color)
The color of text elements in bottom sheet.
-
setDetailsActionColor
final Unit setDetailsActionColor(Integer color)
The color of Submit button.
-
setBarcodesCountText
final Unit setBarcodesCountText(String placeholder)
The placeholder for barcodes count text. Should be a string in the following format: "%d Codes".
-
setBarcodesCountTextColor
final Unit setBarcodesCountTextColor(Integer color)
The color for barcodes count text.
-
setFetchingStateText
final Unit setFetchingStateText(String text)
The text for the data fetching state of the barcode item in a list. Smth "Fetching info…".
-
setBarcodeFilter
final Unit setBarcodeFilter(IBarcodeFilter barcodeFilter)
Additional filter to reject or accept barcode scanner results. The default value is an instance of BarcodeFilter.
-
setBarcodeFormatsFilter
final Unit setBarcodeFormatsFilter(List<BarcodeFormat> barcodeFormat)
A list of barcodes that the scanner should recognize. Anything not on the list will not trigger a successful scan.
By default, all supported barcode formats will be scanned.
-
setFormattedBarcodeDataMapper
final Unit setFormattedBarcodeDataMapper(FormattedBarcodeDataMapper dataMapper)
Additional filter to reject or accept barcode scanner results. The default value is an instance of BarcodeFilter.
-
setSuccessfulScanningInterval
final Unit setSuccessfulScanningInterval(Long scanningIntervalInMs)
Set an interval between successful scanned frames in milliseconds.
- Parameters:
scanningIntervalInMs- interval between successful scanned frames
-
setEngineMode
final Unit setEngineMode(BarcodeScannerEngineMode engineMode)
Allows to set custom BarcodeScannerEngineMode for the barcode scanning. BarcodeScannerEngineMode.NEXT_GEN is used by default.
- Parameters:
engineMode- of the scanner to use
-
setAcceptedDocumentFormats
final Unit setAcceptedDocumentFormats(ArrayList<BarcodeDocumentFormat> documentFormats)
A list of document formats that the scanner should recognize. Anything not on the list will not trigger a successful scan.
By default, all supported barcode document formats will be scanned.
-
setFlashEnabled
final Unit setFlashEnabled(Boolean flashEnabled)
Controls whether the flash should be initially enabled. The default value is
false.
-
setOrientationLockMode
final Unit setOrientationLockMode(CameraOrientationMode cameraOrientationMode)
Orientation lock mode of the camera: CameraOrientationMode.PORTRAIT or CameraOrientationMode.LANDSCAPE. By default the camera orientation is not locked.
-
setSuccessBeepEnabled
final Unit setSuccessBeepEnabled(Boolean successBeepEnabled)
Controls whether to play a beep sound after a successful scanning. Default value is
true.
-
setTopBarBackgroundColor
final Unit setTopBarBackgroundColor(Integer topBarBackgroundColor)
Background color of the top toolbar.
-
setTopBarButtonsColor
final Unit setTopBarButtonsColor(Integer topBarButtonsColor)
Color of the titles of all buttons in the top toolbar.
-
setTopBarButtonsInactiveColor
final Unit setTopBarButtonsInactiveColor(Integer topBarButtonsInactiveColor)
The color of the inactive flash button in the toolbar.
-
setCameraOverlayColor
final Unit setCameraOverlayColor(Integer cameraOverlayColor)
Background color outside of the finder window.
-
setViewFinderEnabled
final Unit setViewFinderEnabled(Boolean viewFinderEnabled)
Set
trueto enable showing the area of interest on camera preview. Enabled by default.
-
setFinderAspectRatio
final Unit setFinderAspectRatio(AspectRatio finderAspectRatio)
Aspect ratio of the finder window.
-
setFinderLineWidth
final Unit setFinderLineWidth(Integer finderLineWidth)
Thickness of the finder window's outline in Px.
-
setFinderLineColor
final Unit setFinderLineColor(Integer finderLineColor)
Color of the finder window's outline.
-
setFinderTextHintColor
final Unit setFinderTextHintColor(Integer finderTextHintColor)
Color of the text hint under the finder window.
-
setUseButtonsAllCaps
final Unit setUseButtonsAllCaps(Boolean allCaps)
Controls whether buttons should use all capitals style.
-
setAutoCancelTimeout
final Unit setAutoCancelTimeout(Integer seconds)
Sets auto close timer in seconds. 0 = disabled and it is the default value.
-
setCameraZoomRatio
final Unit setCameraZoomRatio(Float zoomRatio)
Set current zoom ratio from 0.5x up to 100x (if supported). Default value is 1x.
- Parameters:
zoomRatio- Target zoom value to be set.
-
setCameraZoomRange
final Unit setCameraZoomRange(ZoomRange zoomRange)
Set custom camera zoom range. Min value 0.5f and max value 100f (if supported by device). Default value is ZoomRange(0.5x, 100x).
-
setCameraModule
final Unit setCameraModule(CameraModule cameraModule)
Set supported camera module: CameraModule.BACK, CameraModule.FRONT or others. Optional. By default is CameraModule.BACK.
-
setCameraPreviewMode
final Unit setCameraPreviewMode(CameraPreviewMode cameraPreviewMode)
Preview mode of the camera: Fit-In or Fill-In. Optional, default is Fill-In.
-
setMinFocusDistanceLock
final Unit setMinFocusDistanceLock(Boolean lock)
Locks the minimal supported focus distance and disables a continuous focus
- Parameters:
lock- iftrueminimal available focus distance will be locked,false- otherwise Default isfalse.
-
setCancelButtonTitle
final Unit setCancelButtonTitle(String cancelButtonTitle)
Title of the cancel button.
-
setCancelButtonIcon
final Unit setCancelButtonIcon(Integer cancelButtonIcon)
Icon of the cancel button.
-
setFinderTextHint
final Unit setFinderTextHint(String finderTextHint)
Text hint shown under the finder window.
-
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.
-
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.
-
setAdditionalScanningParameters
final Unit setAdditionalScanningParameters(BarcodeScannerAdditionalConfiguration additionalConfiguration)
Sets additional configuration for BarcodeScanner 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 BarcodeScannerAdditionalConfiguration.
-
setSelectionOverlayConfiguration
final Unit setSelectionOverlayConfiguration(SelectionOverlayConfiguration configuration)
Controls the state of the Barcode selection overlay. Disabled by default.
Displays contours of the barcode and allows users to select the barcode on a AR-like layer
-
setInitialScanDelayMs
final Unit setInitialScanDelayMs(Long milliseconds)
Sets initial scan delay in ms. 0 = disabled and it is the default value
-
setTouchToFocusEnabled
final Unit setTouchToFocusEnabled(Boolean enabled)
Controls whether the touch to focus feature should be enabled. Default is
true.
-
-
-
-