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
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
rawTextstringRaw Barcode string.
acceptedFormatsBarcodeDocumentFormat[]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
imageImageSourceThe image to scan. The image must be a valid, supported image format.
configurationBarcodeScannerConfigurationOptional 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
imageImageRefImageRef object. It is a Scanbot class for efficiently handling image objects.
configurationBarcodeScannerConfigurationOptional 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
pdfFileUristringThe PDF file Uri path. The path must locate to a valid PDF file.
configurationBarcodeScannerConfigurationOptional 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
configurationBarcodeScannerScreenConfigurationCustomize 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.