React Native barKoder SDK API Reference

API #

getBarcodeTypeLengthRange #

                ▸ getBarcodeTypeLengthRange(barcodeType): Promise<number[]>
            

Parameters: #

NameType
barcodeTypeBarcodeType

getBarkoderResolution #

                ▸ getBarkoderResolution(): Promise<BarkoderResolution>
            

getCode11ChecksumType #

                ▸ getCode11ChecksumType(): Promise<Code11ChecksumType>
            

getCode39ChecksumType #

                ▸ getCode39ChecksumType(): Promise<Code39ChecksumType>
            

getDecodingSpeed #

                ▸ getDecodingSpeed(): Promise<DecodingSpeed>
            

getEncodingCharacterSet #

                ▸ getEncodingCharacterSet(): Promise<string>
            

getFormattingType #

                ▸ getFormattingType(): Promise&lt;FormattingType&gt;
            

getLocationLineColorHex #

                ▸ getLocationLineColorHex(): Promise<string>
            

getLocationLineWidth #

                ▸ getLocationLineWidth(): Promise<number>
            

getMaxZoomFactor #

                ▸ getMaxZoomFactor(): Promise<number>
            

getMaximumResultsCount #

                ▸ getMaximumResultsCount(): Promise<number>
            

getMsiChecksumType #

                ▸ getMsiChecksumType(): Promise<MsiChecksumType>
            

getMulticodeCachingDuration #

                ▸ getMulticodeCachingDuration(): Promise<number>
            

getMulticodeCachingEnabled #

                ▸ getMulticodeCachingEnabled(): Promise<boolean>
            

getRegionOfInterest #

                ▸ getRegionOfInterest(): Promise<number[]>
            

getRoiLineColorHex #

                ▸ getRoiLineColorHex(): Promise<string>
            

getRoiLineWidth #

                ▸ getRoiLineWidth(): Promise<number>
            

getRoiOverlayBackgroundColorHex #

                ▸ getRoiOverlayBackgroundColorHex(): Promise<string>
            

getThreadsLimit #

                ▸ getThreadsLimit(): Promise<number>
            

getThresholdBetweenDuplicatesScans #

                ▸ getThresholdBetweenDuplicatesScans(): Promise<number>
            

getVersion #

                ▸ getVersion(): Promise<string>
            

isAndroid #

                ▸ isAndroid(): boolean
            

isBarcodeThumbnailOnResultEnabled #

                ▸ isBarcodeThumbnailOnResultEnabled(): Promise<boolean>
            

isBarcodeTypeEnabled #

                ▸ isBarcodeTypeEnabled(barcodeType): Promise<boolean>
            

Parameters #

NameType
barcodeTypeBarcodeType

isBeepOnSuccessEnabled #

                ▸ isBeepOnSuccessEnabled(): Promise<boolean>
            

isCloseSessionOnResultEnabled #

                ▸ isCloseSessionOnResultEnabled(): Promise<boolean>
            

isFlashAvailable #

                ▸ isFlashAvailable(): Promise<boolean>
            

isImageResultEnabled #

                ▸ isImageResultEnabled(): Promise<boolean>
            

isIos #

                ▸ isIos(): boolean
            

isLocationInImageResultEnabled #

                ▸ isLocationInImageResultEnabled(): Promise<boolean>
            

isLocationInPreviewEnabled #

                ▸ isLocationInPreviewEnabled(): Promise<boolean>
            

isMisshaped1DEnabled #

                ▸ isMisshaped1DEnabled(): Promise<boolean>
            

isPinchToZoomEnabled #

                ▸ isPinchToZoomEnabled(): Promise<boolean>
            

isRegionOfInterestVisible #

                ▸ isRegionOfInterestVisible(): Promise<boolean>
            

isUpcEanDeblurEnabled #

                ▸ isUpcEanDeblurEnabled(): Promise<boolean>
            

isVINRestrictionsEnabled #

                ▸ isVINRestrictionsEnabled(): Promise<boolean>
            

isVibrateOnSuccessEnabled #

                ▸ isVibrateOnSuccessEnabled(): Promise<boolean>
            

onDataReturned #

                ▸ onDataReturned(event): void
            

Parameters:

NameType
eventany

pauseScanning #

                ▸ pauseScanning(): void
            

Temporarily suspends the barcode scanning process, pausing the camera feed without completely stopping the scanning session.

setBarcodeThumbnailOnResultEnabled #

                ▸ setBarcodeThumbnailOnResultEnabled(enabled): void
            

Parameters

NameType
enabledboolean

setBarcodeTypeEnabled #

                ▸ setBarcodeTypeEnabled(barcodeType, enabled): void
            

setBarcodeTypeLengthRange #

                ▸ setBarcodeTypeLengthRange(barcodeType, min, max): Promise<boolean>
            

setBarkoderResolution #

                **setBarkoderResolution**(barkoderResolution): void

            

Sets the resolution for barcode scanning.

setBeepOnSuccessEnabled #

                **setBeepOnSuccessEnabled**(enabled): void

            

Enables or disables the audible beep sound upon successfully decoding a barcode.

Parameters:

NameType
enabledboolean

setCloseSessionOnResultEnabled #

                **setCloseSessionOnResultEnabled**(enabled): void

            

Enables or disables the automatic closing of the scanning session upon detecting a barcode result.

Parameters:

NameType
enabledboolean

setCode11ChecksumType #

                ▸ setCode11ChecksumType(code11ChecksumType): void
            

setCode39ChecksumType #

                ▸ setCode39ChecksumType(code39ChecksumType): void
            

setDatamatrixDpmModeEnabled #

                ▸ setDatamatrixDpmModeEnabled(enabled): void
            

setDecodingSpeed #

                **setDecodingSpeed**(decodingSpeed): void

            

Sets the decoding speed for barcode scanning.

setEnableMisshaped1DEnabled #

                ▸ setEnableMisshaped1DEnabled(enabled): void
            

setEnableVINRestrictions #

                ▸ setEnableVINRestrictions(enabled): void
            

setEncodingCharacterSet #

                **setEncodingCharacterSet**(encodingCharacterSet): void

            

Sets the encoding character set for barcode scanning

setFlashEnabled #

                ▸ **setFlashEnabled**(enabled): void

            

Enables or disables the device's flash (torch) for illumination during barcode scanning

setFormattingType #

                ▸ setFormattingType(formatting): void
            

setImageResultEnabled #

                **setImageResultEnabled**(enabled): void

            

Enables or disables the capturing and processing of image data when a barcode is successfully detected.

setLocationInImageResultEnabled #

                **setLocationInImageResultEnabled**(enabled): void

            

Enables or disables the inclusion of barcode location information within the image data result

setLocationInPreviewEnabled #

                **setLocationInPreviewEnabled**(enabled): void

            

Enables or disables the display of barcode location information on the camera preview.

setLocationLineColor #

                **setLocationLineColor**(hexColor): Promise<boolean>

            

Sets the color of the lines used to indicate the location of detected barcodes on the camera feed.

Parameters

NameType
hexColorString

setLocationLineWidth #

                **setLocationLineWidth**(lineWidth): void

            

Sets the width of the lines indicating the location of detected barcodes on the camera feed.

Parameters:

NameType
lineWidthnumber

setMaximumResultsCount #

▸ setMaximumResultsCount(maximumResultsCount): void

Parameters:

NameType
maximumResultsCountnumber

setMsiChecksumType #

                ▸ setMsiChecksumType(msiChecksumType): void
            

setMulticodeCachingDuration #

                ▸ setMulticodeCachingDuration(multicodeCachingDuration): any
            

setMulticodeCachingEnabled #

                ▸ setMulticodeCachingEnabled(multicodeCachingEnabled): any
            

setPinchToZoomEnabled #

                **setPinchToZoomEnabled**(enabled): void

            

Enables or disables the pinch-to-zoom feature for adjusting the zoom level during barcode scanning.

setRegionOfInterest #

                **setRegionOfInterest**(left, top, width, height): Promise<boolean>

            

Defines the Region of Interest (ROI) on the camera preview for barcode scanning, specifying an area where the application focuses on detecting barcodes.

Parameters:

NameType
leftnumber
topnumber
widthnumber
heightnumber

setRegionOfInterestVisible #

                **setRegionOfInterestVisible**(visible): void

            

Sets the visibility of the Region of Interest (ROI) on the camera preview.

Parameters:

NameType
visibleboolean

setRoiLineColor #

                **setRoiLineColor**(hexColor): Promise<boolean>

            

Sets the color of the lines outlining the Region of Interest (ROI) for barcode scanning on the camera feed.

Parameters:

NameType
hexColorString

setRoiLineWidth #

                **setRoiLineWidth**(lineWidth): void

            

Sets the width of the lines outlining the Region of Interest (ROI) for barcode scanning on the camera feed

Parameters:

NameType
lineWidthnumber

setRoiOverlayBackgroundColor #

                **setRoiOverlayBackgroundColor**(hexColor): Promise<boolean>

            

Sets the background color of the overlay within the Region of Interest (ROI) for barcode scanning on the camera feed.

Parameters:

NameType
hexColorString

setThreadsLimit #

                ▸ setThreadsLimit(threadsLimit): Promise<boolean>
            

Parameters:

NameType
threadsLimitnumber

setThresholdBetweenDuplicatesScans #

                ▸ setThresholdBetweenDuplicatesScans(thresholdBetweenDuplicatesScans): void
            

Parameters:

NameType
thresholdBetweenDuplicatesScansnumber

setUpcEanDeblurEnabled #

                ▸ setUpcEanDeblurEnabled(enabled): void
            

Parameters:

NameType
enabledboolean

setVibrateOnSuccessEnabled #

                **setVibrateOnSuccessEnabled**(enabled): void

            

Enables or disables the device vibration upon successfully decoding a barcode.

Parameters:

NameType
enabledboolean

setZoomFactor #

                **setZoomFactor**(zoomFactor): void

            

Sets the zoom factor for the device's camera, adjusting the level of zoom during barcode scanning.

Parameters:

NameType
zoomFactornumber

startCamera #

                ▸ startCamera(): void
            

startScanning #

                **startScanning**(resultsCallback): void

            

Initiates the barcode scanning process, allowing the application to detect and decode barcodes from the device's camera feed.

Parameters:

NameType
resultsCallbackResultCallback

startScanningEventEmmitter #

                ▸ startScanningEventEmmitter(): void
            

stopScanning #

                **stopScanning**(): void

            

Halts the barcode scanning process, stopping the camera from capturing and processing barcode information

captureImage #

                ▸ captureImage(): void
            

Captures the latest camera frame.

configureCloseButton #

                ▸ configureCloseButton(visible, positionX, positionY, iconSize, tintColor, backgroundColor, cornerRadius, padding, useCustomIcon, customIcon): void
            

Configures the close button shown during scanning.

Parameters:

NameType
visibleboolean
positionXnumber
positionYnumber
iconSizenumber
tintColorstring
backgroundColorstring
cornerRadiusnumber
paddingnumber
useCustomIconboolean
customIconstring

configureFlashButton #

                ▸ configureFlashButton(visible, positionX, positionY, iconSize, tintColor, backgroundColor, cornerRadius, padding, useCustomIcon, customIconFlashOn, customIconFlashOff): void
            

Configures the flash (torch) button shown during scanning; auto-hides if the device torch is unavailable.

Parameters:

NameType
visibleboolean
positionXnumber
positionYnumber
iconSizenumber
tintColorstring
backgroundColorstring
cornerRadiusnumber
paddingnumber
useCustomIconboolean
customIconFlashOnstring
customIconFlashOffstring

configureZoomButton #

                ▸ configureZoomButton(visible, positionX, positionY, iconSize, tintColor, backgroundColor, cornerRadius, padding, useCustomIcon, customIconZoomedIn, customIconZoomedOut, zoomedInFactor, zoomedOutFactor): void
            

Configures the zoom button shown during scanning.

Parameters:

NameType
visibleboolean
positionXnumber
positionYnumber
iconSizenumber
tintColorstring
backgroundColorstring
cornerRadiusnumber
paddingnumber
useCustomIconboolean
customIconZoomedInstring
customIconZoomedOutstring
zoomedInFactornumber
zoomedOutFactornumber

freezeScanning #

                ▸ freezeScanning(): void
            

Freezes the current AR scanning session by capturing a still image from the camera feed. Use only when AR mode is enabled to temporarily freeze the view while keeping overlays visible.

getCurrentZoomFactor #

                ▸ getCurrentZoomFactor(): Promise
            

Retrieves the current zoom factor for the device's camera.

getARMode #

                ▸ getARMode(): Promise
            

Retrieves the current AR mode used for barcode scanning.

getARResultDisappearanceDelayMs #

                ▸ getARResultDisappearanceDelayMs(): Promise
            

Retrieves the delay after which AR results disappear once detected.

getARLocationTransitionSpeed #

                ▸ getARLocationTransitionSpeed(): Promise
            

Retrieves the transition speed for AR barcode location overlays.

getAROverlayRefresh #

                ▸ getAROverlayRefresh(): Promise<BarkoderAROverlayRefresh>
            

Retrieves the AR overlay refresh mode.

getARSelectedLocationColor #

                ▸ getARSelectedLocationColor(): Promise
            

Retrieves the color used for selected barcode overlays in AR mode.

getARNonSelectedLocationColor #

                ▸ getARNonSelectedLocationColor(): Promise
            

Retrieves the color used for non-selected barcode overlays in AR mode.

getARSelectedLocationLineWidth #

                ▸ getARSelectedLocationLineWidth(): Promise
            

Retrieves the line width for selected barcode overlays in AR mode.

getARNonSelectedLocationLineWidth #

                ▸ getARNonSelectedLocationLineWidth(): Promise
            

Retrieves the line width for non-selected barcode overlays in AR mode.

getARLocationType #

                ▸ getARLocationType(): Promise<BarkoderARLocationType>
            

Retrieves the style of AR location overlays (tight, bounding box, none).

getARResultLimit #

                ▸ getARResultLimit(): Promise
            

Retrieves the maximum number of results allowed in a single AR scanning session.

getARContinueScanningOnLimit #

                ▸ getARContinueScanningOnLimit(): Promise
            

Retrieves whether scanning continues when the result limit is reached (only in .interactiveDisabled mode).

getAREmitResultsAtSessionEndOnly #

                ▸ getAREmitResultsAtSessionEndOnly(): Promise
            

Retrieves whether results are emitted only at AR session end (or when the limit is reached).

getARHeaderHeight #

                ▸ getARHeaderHeight(): Promise
            

Retrieves the header height above barcode in AR mode.

getARHeaderShowMode #

                ▸ getARHeaderShowMode(): Promise<BarkoderARHeaderShowMode>
            

Retrieves the header display mode (always, on selected, never).

getARHeaderMaxTextHeight #

                ▸ getARHeaderMaxTextHeight(): Promise
            

Retrieves the maximum text height for AR headers.

getARHeaderMinTextHeight #

                ▸ getARHeaderMinTextHeight(): Promise
            

Retrieves the minimum text height for AR headers.

getARHeaderTextColorSelected #

                ▸ getARHeaderTextColorSelected(): Promise
            

Retrieves the header text color for selected barcodes.

getARHeaderTextColorNonSelected #

                ▸ getARHeaderTextColorNonSelected(): Promise
            

Retrieves the header text color for non-selected barcodes.

getARHeaderHorizontalTextMargin #

                ▸ getARHeaderHorizontalTextMargin(): Promise
            

Retrieves the horizontal margin for AR header text.

getARHeaderVerticalTextMargin #

                ▸ getARHeaderVerticalTextMargin(): Promise
            

Retrieves the vertical margin for AR header text.

getARHeaderTextFormat #

                ▸ getARHeaderTextFormat(): Promise
            

Retrieves the format string used for AR header text.

getShowDuplicatesLocations #

                ▸ getShowDuplicatesLocations(): Promise
            

Retrieves whether showing duplicate barcode locations in the AR view is enabled.

getScanningIndicatorColorHex #

                ▸ getScanningIndicatorColorHex(): Promise
            

Retrieves the hexadecimal color code representing the line color of the scanning indicator on the camera preview.

getScanningIndicatorWidth #

                ▸ getScanningIndicatorWidth(): Promise
            

Retrieves the current width setting for the scanning indicator on the camera preview.

getScanningIndicatorAnimation #

                ▸ getScanningIndicatorAnimation(): Promise
            

Retrieves the current animation setting for the scanning indicator on the camera preview.

isARDoubleTapToFreezeEnabled #

                ▸ isARDoubleTapToFreezeEnabled(): Promise
            

Checks whether double-tap to freeze is enabled in AR mode.

isARImageResultEnabled #

                ▸ isARImageResultEnabled(): Promise
            

Retrieves whether image result is enabled for AR mode.

isARBarcodeThumbnailOnResultEnabled #

                ▸ isARBarcodeThumbnailOnResultEnabled(): Promise
            

Retrieves whether barcode thumbnail on result is enabled for AR mode.

isIdDocumentMasterChecksumEnabled #

                ▸ isIdDocumentMasterChecksumEnabled(): Promise
            

Retrieves whether Master checksum is enabled when scanning ID Documents.

isQrDpmModeEnabled #

                ▸ isQrDpmModeEnabled(): Promise
            

Retrieves whether Direct Part Marking (DPM) mode for QR barcodes is enabled.

isQrMicroDpmModeEnabled #

                ▸ isQrMicroDpmModeEnabled(): Promise
            

Retrieves whether Direct Part Marking (DPM) mode for QR Micro barcodes is enabled.

isQrMultiPartMergeEnabled #

                ▸ isQrMultiPartMergeEnabled(): Promise
            

Retrieves whether the QR multi-part merge mode is enabled.

isScanningIndicatorAlwaysVisible #

                ▸ isScanningIndicatorAlwaysVisible(): Promise
            

Retrieves if the scanning indicator is set to be always visible on the camera preview.

onCloseButtonTapped #

                ▸ onCloseButtonTapped(callback): void
            

Registers a callback for the SDK Close button during scanning. This is triggered when the user taps the Close button configured via configureCloseButton

Parameters:

NameType
callback() => void

scanImage #

                ▸ scanImage(base64, resultsCallback`): void
            

Scan barcodes from base64 string image.

Parameters:

NameType
base64String
resultsCallbackResultCallback

selectVisibleBarcodes #

                ▸ selectVisibleBarcodes(): void
            

Selects all barcodes that are currently visible in AR mode.

setCentricFocusAndExposure #

                ▸ setCentricFocusAndExposure(value): void
            

Sets the camera to use the center of the viewfinder for focus and exposure.

Parameters:

NameType
valueboolean

setCustomOption #

                ▸ setCustomOption(string, int`): void
            

Setting custom option.

Parameters:

NameType
stringString
intnumber

setDynamicExposure #

                ▸ setDynamicExposure(intensity): void
            

Sets the camera's exposure dynamically based on the provided intensity, cycling through predefined compensation values.

Parameters:

NameType
intensitynumber

setARMode #

                ▸ setARMode(value): void
            

Sets the AR mode used for barcode scanning visualization.

Parameters:

NameType
valueBarkoderARMode

setARResultDisappearanceDelayMs #

                ▸ setARResultDisappearanceDelayMs(value): void
            

Parameters:

NameType
valuenumber

setARLocationTransitionSpeed #

                ▸ setARLocationTransitionSpeed(value): void
            

Parameters:

NameType
valuenumber

setAROverlayRefresh #

                ▸ setAROverlayRefresh(value): void
            

Parameters:

NameType
valueBarkoderAROverlayRefresh

setARSelectedLocationColor #

                ▸ setARSelectedLocationColor(value): void
            

Parameters:

NameType
hexColorstring

setARNonSelectedLocationColor #

                ▸ setARNonSelectedLocationColor(value): void
            

Parameters:

NameType
hexColorstring

setARSelectedLocationLineWidth #

                ▸ setARSelectedLocationLineWidth(value): void
            

Parameters:

NameType
valuenumber

setARNonSelectedLocationLineWidth #

                ▸ setARNonSelectedLocationLineWidth(value): void
            

Parameters:

NameType
valuenumber

setARLocationType #

                ▸ setARLocationType(value): void
            

Parameters:

NameType
valueBarkoderARLocationType

setARDoubleTapToFreezeEnabled #

                ▸ setARDoubleTapToFreezeEnabled(enabled): void
            

Parameters:

NameType
enabledboolean

setARImageResultEnabled #

                ▸ setARImageResultEnabled(enabled): void
            

Parameters:

NameType
enabledboolean

setARBarcodeThumbnailOnResultEnabled #

                ▸ setARBarcodeThumbnailOnResultEnabled(enabled): void
            

Parameters:

NameType
enabledboolean

setARResultLimit #

                ▸ setARResultLimit(value): void
            

Parameters:

NameType
valuenumber

setARContinueScanningOnLimit #

                ▸ setARContinueScanningOnLimit(value): void
            

Parameters:

NameType
valueboolean

setAREmitResultsAtSessionEndOnly #

                ▸ setAREmitResultsAtSessionEndOnly(value): void
            

Parameters:

NameType
valueboolean

setARHeaderHeight #

                ▸ setARHeaderHeight(value): void
            

Parameters:

NameType
valuenumber

setARHeaderShowMode #

                ▸ setARHeaderShowMode(value): void
            

Parameters:

NameType
valueBarkoderARHeaderShowMode

setARHeaderMaxTextHeight #

                ▸ setARHeaderMaxTextHeight(value): void
            

Parameters:

NameType
valuenumber

setARHeaderMinTextHeight #

                ▸ setARHeaderMinTextHeight(value): void
            

Parameters:

NameType
valuenumber

setARHeaderTextColorSelected #

                ▸ setARHeaderTextColorSelected(value): void
            

Parameters:

NameType
hexColorstring

setARHeaderTextColorNonSelected #

                ▸ setARHeaderTextColorNonSelected(value): void
            

Parameters:

NameType
hexColorstring

setARHeaderHorizontalTextMargin #

                ▸ setARHeaderHorizontalTextMargin(value): void
            

Parameters:

NameType
valuenumber

setARHeaderVerticalTextMargin #

                ▸ setARHeaderVerticalTextMargin(value): void
            

Parameters:

NameType
valuenumber

setARHeaderTextFormat #

                ▸ setARHeaderTextFormat(value): void
            

Parameters:

NameType
valuestring

setCamera #

                ▸ setCamera(value): void
            

Parameters:

NameType
valuenumber

setEnableComposite #

                ▸ setEnableComposite(value): void
            

Parameters:

NameType
valuenumber

setIdDocumentMasterChecksumEnabled #

                ▸ setIdDocumentMasterChecksumEnabled(enabled): void
            

Parameters:

NameType
enabledboolean

setQrDpmModeEnabled #

                ▸ setQrDpmModeEnabled(enabled): void
            

Parameters:

NameType
enabledboolean

setQrMicroDpmModeEnabled #

                ▸ setQrMicroDpmModeEnabled(enabled): void
            

Parameters:

NameType
enabledboolean

setQrMultiPartMergeEnabled #

                ▸ setQrMultiPartMergeEnabled(enabled): void
            

Parameters:

NameType
enabledboolean

setScanningIndicatorAlwaysVisible #

                ▸ setScanningIndicatorAlwaysVisible(value): void
            

Parameters:

NameType
valueboolean

setScanningIndicatorColor #

                ▸ setScanningIndicatorColor(value): void
            

Parameters:

NameType
hexColorString

setScanningIndicatorWidth #

                ▸ setScanningIndicatorWidth(lineWidth): void
            

Parameters:

NameType
lineWidthnumber

setScanningIndicatorAnimation #

                ▸ setScanningIndicatorAnimation(animation): void
            

Parameters:

NameType
animationnumber

setShowDuplicatesLocations #

                ▸ setShowDuplicatesLocations(value): void
            

Enables or disables showing duplicate barcode locations on the preview overlay.

Parameters:

NameType
valueboolean

setUPCEexpandToUPCA #

                ▸ setUPCEexpandToUPCA(enabled): void
            

Sets whether the UPC-E barcodes should be expanded to UPC-A format.

Parameters:

NameType
enabledboolean

setUPCE1expandToUPCA #

                ▸ setUPCE1expandToUPCA(enabled): void
            

Sets whether the UPC-E1 barcodes should be expanded to UPC-A format.

Parameters:

NameType
enabledboolean

setVideoStabilization #

                ▸ setVideoStabilization(value): void
            

Enable or disable video stabilization for smoother video capture.

Parameters:

NameType
valueboolean

unfreezeScanning #

                ▸ unfreezeScanning(): void
            

Unfreezes the AR scanning session by removing the still image and reactivating the camera and overlays. Use only when AR mode is enabled to restore the live AR view and continue scanning.

Page Contents