Deprecated

Use BarcodeScannerConfiguration from 'react-native-scanbot-barcode-scanner-sdk/ui_v2' instead

interface BarcodeScannerConfiguration {
    acceptedDocumentFormats?: BarcodeDocumentFormat[];
    australiaPostCustomerFormat?: AustraliaPostCustomerFormat;
    autoCancelTimeout?: number;
    barcodeFormats?: BarcodeFormat[];
    barcodeValueFilter?: string;
    barcodesExtensionFilter?: BarcodesExtensionFilter;
    cameraModule?: CameraModule;
    cameraOverlayColor?: string;
    cameraPreviewMode?: CameraPreviewMode;
    cameraZoomFactor?: number;
    cameraZoomRange?: ZoomRange;
    cancelButtonHidden?: boolean;
    cancelButtonTitle?: string;
    confirmationDialogConfiguration?: ConfirmationDialogConfiguration;
    delayAfterScan?: number;
    doubleTapToZoomEnabled?: boolean;
    enableCameraButtonTitle?: string;
    enableCameraExplanationText?: string;
    engineMode?: EngineMode;
    finderAspectRatio?: AspectRatio;
    finderLineColor?: string;
    finderLineWidth?: number;
    finderTextHint?: string;
    finderTextHintColor?: string;
    flashButtonHidden?: boolean;
    flashButtonInactiveColor?: string;
    flashButtonTitle?: string;
    flashEnabled?: boolean;
    focusLockEnabled?: boolean;
    focusLockPosition?: number;
    gs1HandlingMode?: Gs1HandlingMode;
    initialScanDelay?: number;
    lowPowerMode?: boolean;
    maximumTextLength?: number;
    minFocusDistanceLock?: boolean;
    minimum1DBarcodesQuietZone?: number;
    minimumTextLength?: number;
    msiPlesseyChecksumAlgorithm?: MSIPlesseyChecksumAlgorithm;
    orientationLockMode?: OrientationLockMode;
    overlayConfiguration?: SelectionOverlayConfiguration;
    pinchToZoomEnabled?: boolean;
    replaceCancelButtonWithIcon?: boolean;
    shouldAnimateZooming?: boolean;
    stripCheckDigits?: boolean;
    successBeepEnabled?: boolean;
    topBarBackgroundColor?: string;
    topBarButtonsColor?: string;
    touchToFocusEnabled?: boolean;
    useButtonsAllCaps?: boolean;
    useCode11Checksum?: boolean;
    useIATA2OF5Checksum?: boolean;
    viewFinderEnabled?: boolean;
}

Properties

acceptedDocumentFormats?: BarcodeDocumentFormat[]

An optional array of barcode document formats that act as a detection filter. By default all supported document formats will be detected.

australiaPostCustomerFormat?: AustraliaPostCustomerFormat

The customer format used in AUSTRALIA_POST codes. Only relevant for format codes 59 and 62. The default value is ALPHA_NUMERIC.

autoCancelTimeout?: number

Sets auto close timer in seconds. 0 = disabled and it is the default value.

barcodeFormats?: BarcodeFormat[]

Accepted barcode formats

barcodeValueFilter?: string

Filter barcodes results by regular expression. To accept scanned barcode, regular expression should match the entire barcode value. By default, no filter is applied

barcodesExtensionFilter?: BarcodesExtensionFilter

The extension filter for EAN and UPC barcodes.

cameraModule?: CameraModule

The camera module to be used for barcode scanning. The default value is BACK.

cameraOverlayColor?: string

Background color of the detection overlay.

cameraPreviewMode?: CameraPreviewMode

Preview mode of the camera. FILL_IN or FIT_IN. Default is FILL_IN. Android only

cameraZoomFactor?: number

The relative initial zoom level of the camera in the range (0,1), where 0 is zoomed out and 1 is zoomed in. Default value is 0.0.

cameraZoomRange?: ZoomRange

The range of valid camera zoom factors. Default value is (1.0; 12.0).

cancelButtonHidden?: boolean

Whether the cancel button is hidden or not. iOS only.

cancelButtonTitle?: string

String being displayed on the cancel button.

confirmationDialogConfiguration?: ConfirmationDialogConfiguration

The confirmation dialog configuration.

delayAfterScan?: number

Freezes a preview after a scan for a given amount of seconds. Defaults to 0 secs. Android only.

doubleTapToZoomEnabled?: boolean

When this property is set to true, the zoom can be activated by double tapping somewhere in the receivers view. iOS only.

enableCameraButtonTitle?: string

Title of the button that opens the screen where the user can allow the usage of the camera by the app.

enableCameraExplanationText?: string

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.

engineMode?: EngineMode

The engine mode to be used for barcode scanning. The default value is NEXT_GEN.

finderAspectRatio?: AspectRatio

Aspect ratio of finder frame (width \ height), which is used to build actual finder frame. Default is 1 - it is a square frame, which is good for QR capturing.

finderLineColor?: string

Foreground color of the detection overlay.

finderLineWidth?: number

Width of finder frame border. Default is 2.

finderTextHint?: string

String being displayed as description.

finderTextHintColor?: string

Foreground color of the description label.

flashButtonHidden?: boolean

Controls whether the flash toggle button is hidden or not. iOS only.

flashButtonInactiveColor?: string

Foreground color of the flash button when flash is off.

flashButtonTitle?: string

String being displayed on the flash button. iOS only.

flashEnabled?: boolean

Whether flash is toggled on or off.

focusLockEnabled?: boolean

Disables auto-focus and locks the lens at the specified focus lock lens position. Default value is false. iOS only. For Android, minFocusDistanceLock can be used.

focusLockPosition?: number

The position of the lens. Values can be between 0.0f (minimum focusing distance) and 1.0f (maximum focusing distance). The default value is 0.0 iOS only. For Android, minFocusDistanceLock can be used.

gs1HandlingMode?: Gs1HandlingMode

The GS1 handling mode. The default value is PARSE.

initialScanDelay?: number

Scanning delay after scanner appearance in seconds. Defaults to 0 secs.

lowPowerMode?: boolean

If true, enabled the mode which slightly decreases the scanning quality and the energy consumption, and increases the scanning speed. If false - mode is disabled. The default is false. Android only.

maximumTextLength?: number

Optional maximum text length of the detected barcode. The default is 0 (setting is turned off). NOTE - This feature works on ITF barcodes only.

minFocusDistanceLock?: boolean

Lock focus distance withing minimum possible range

minimum1DBarcodesQuietZone?: number

Optional minimum required quiet zone on the barcode. Measured in modules (the size of minimal bar on the barcode). The default is 10. NOTE - This feature works on ITF barcodes only.

minimumTextLength?: number

Optional minimum required text length of the detected barcode. The default is 0 (setting is turned off). NOTE - This feature works on ITF barcodes only.

msiPlesseyChecksumAlgorithm?: MSIPlesseyChecksumAlgorithm

The checksum algorithm for MSI Plessey barcodes. The default value is MOD_10.

orientationLockMode?: OrientationLockMode

UI Interface orientation lock mode

overlayConfiguration?: SelectionOverlayConfiguration

The selection overlay configuration.

pinchToZoomEnabled?: boolean

When this property is set to true, the zoom can be activated by a pinch gesture somewhere in the receivers view. iOS only.

replaceCancelButtonWithIcon?: boolean

If true, replaces the cancel button in the top bar with a back arrow icon. The default value is FALSE. Android only.

shouldAnimateZooming?: boolean

Defines, if zooming in or out should be animated. iOS only.

stripCheckDigits?: boolean

With this option enabled, the scanner removes checks digits for UPC, EAN and MSI Plessey codes. Has no effect if both single and double digit MSI Plessey checksums are enabled. The default is false

successBeepEnabled?: boolean

Whether scanner screen should make a sound on successful barcode or MRZ detection.

topBarBackgroundColor?: string

Background color of the top bar.

topBarButtonsColor?: string

Foreground color of the cancel button.

touchToFocusEnabled?: boolean

Whether touch-to-focus is enabled on camera preview. Enabled by default. Android only.

useButtonsAllCaps?: boolean

Controls whether buttons should use all capitals style, as defined by the Android Material Design. Defaults to TRUE. Android only.

useCode11Checksum?: boolean

If true, the optional check digit for CODE_11 codes is used in validation. The default is true.

useIATA2OF5Checksum?: boolean

If true, the optional check digit for IATA_2_OF_5 codes is used in validation. The default is true.

viewFinderEnabled?: boolean

Display the region of interest. The default value is TRUE.