Table of Contents

Interface IScanbotBarcode

Namespace
ScanbotSDK.MAUI.Barcode
Assembly
ScanbotSDK.Shared.dll

Barcode Scanning service provides us functions to scan single and multiple barcodes.

public interface IScanbotBarcode

Methods

ForceCloseScannerAsync()

Force Closes the BarcodeScanner RTU UI screen.

Task ForceCloseScannerAsync()

Returns

Task

ParseDocumentAsync(string, BarcodeDocumentFormat[])

Parses the raw barcode string into one of the supported BarcodeDocumentFormat or returns null if none of the supported document types was detected.

Task<Result<BarcodeDocumentParserResult>> ParseDocumentAsync(string rawText, BarcodeDocumentFormat[] acceptedFormats = null)

Parameters

rawText string

Raw Barcode string.

acceptedFormats BarcodeDocumentFormat[]

BarcodeDocumentFormat array, Optional. Considers all available BarcodeDocumentFormats if this parameter is null.

Returns

Task<Result<BarcodeDocumentParserResult>>

BarcodeDocumentParserResult wrapped under the Result class.

ScanFromImageAsync(ImageSource, BarcodeScannerConfiguration)

Scans the provided image and decodes supported barcode types using the configured scanner.

Task<Result<BarcodeScannerResult>> ScanFromImageAsync(ImageSource image, BarcodeScannerConfiguration configuration)

Parameters

image ImageSource

The image to scan. The image must be a valid, supported image format.

configuration BarcodeScannerConfiguration

Optional scanner configuration used to customize the scanning behavior. If null, default scanner settings are applied.

Returns

Task<Result<BarcodeScannerResult>>

A task that represents the asynchronous scan operation. The task result contains the BarcodeScannerResult object wrapped inside the Result wrapper class.

ScanFromImageAsync(ImageRef, BarcodeScannerConfiguration)

Scans the provided image and decodes supported barcode types using the configured scanner.

Task<Result<BarcodeScannerResult>> ScanFromImageAsync(ImageRef image, BarcodeScannerConfiguration configuration)

Parameters

image ImageRef

ImageRef object. It is a Scanbot class for efficiently handling image objects.

configuration BarcodeScannerConfiguration

Optional scanner configuration used to customize the scanning behavior. If null, default scanner settings are applied.

Returns

Task<Result<BarcodeScannerResult>>

A task that represents the asynchronous scan operation. The task result contains the BarcodeScannerResult object wrapped inside the Result wrapper class.

ScanFromPdfAsync(string, BarcodeScannerConfiguration)

Extracts PDF from the provided pdfFileUri and decodes supported barcode types using the configured scanner.

Task<Result<BarcodeScannerResult>> ScanFromPdfAsync(string pdfFileUri, BarcodeScannerConfiguration configuration)

Parameters

pdfFileUri string

The PDF file Uri path. The path must locate to a valid PDF file.

configuration BarcodeScannerConfiguration

Optional scanner configuration used to customize the scanning behavior. If null, default scanner settings are applied.

Returns

Task<Result<BarcodeScannerResult>>

A task that represents the asynchronous scan operation. The task result contains the BarcodeScannerResult object wrapped inside the Result wrapper class.

StartScannerAsync(BarcodeScannerScreenConfiguration)

Launches the BarcodeScanner Rtu Ui screen from provided configurations.

Task<Result<BarcodeScannerUiResult>> StartScannerAsync(BarcodeScannerScreenConfiguration configuration)

Parameters

configuration BarcodeScannerScreenConfiguration

Customize your barcode scanner experience by configuring the BarcodeScannerScreenConfiguration object.

Returns

Task<Result<BarcodeScannerUiResult>>

A task of the BarcodeScannerUiResult object wrapped inside the Result wrapper class.