# BarcodeManager ## getInstance ### Method Signature ``` public static BarcodeManager getInstance() ``` ### Return Value ```{list-table} :align: left :class: list-table * - Type - Description * - BarcodeManager - Singleton object BarcodeManager ``` Creates a singleton `BarcodeManager` object. ### Sample Code ```java BarcodeManager barcodeManager = BarcodeManager.getInstance(); ``` --- ## getCharacterStatus ### Method Signature ``` public BarcodeConst.BarcodeSettings getCharacterStatus() ``` ### Return Value ```{list-table} :align: left :class: list-table * - Type - Description * - BarcodeConst.BarcodeSettings - [BarcodeConst.BarcodeSettings](BarcodeConst.md#barcodeconstbarcodesettings) ``` Retrieves the current decode status. ### Sample Code ```java BarcodeConst.BarcodeSettings setting = BarcodeManager.getInstance().getCharacterStatus(); ``` --- ## setCallback ### Method Signature ``` public void setCallback(BarcodeManagerCallback callback) ``` ### Parameters ```{list-table} :align: left :class: list-table * - Parameter - Type - Description * - callback - BarcodeManagerCallback - [BarcodeManagerCallback](BarcodeManagerCallback.md) ``` Sets the callback. ### Sample Code ```java BarcodeManager.getInstance().setCallback(this); ``` --- ## setDecodeMode ### Method Signature ``` public void setDecodeMode(BarcodeConst.BarcodeSettings mode) ``` ### Parameters ```{list-table} :align: left :class: list-table * - Parameter - Type - Description * - mode - BarcodeConst.BarcodeSettings - [BarcodeConst.BarcodeSettings](BarcodeConst.md#barcodeconstbarcodesettings) ``` Sets the decode mode. `BarcodeConst.BarcodeSettings.DECODE_MODE_CONTINUOUS` or `BarcodeConst.BarcodeSettings.DECODE_MODE_SINGLE` ### Sample Code ```java BarcodeManager.getInstance().setDecodeMode(BarcodeConst.BarcodeSettings.DECODE_MODE_SINGLE); ``` --- ## getDecodeMode ### Method Signature ``` public BarcodeConst.BarcodeSettings getDecodeMode() ``` ### Return Value ```{list-table} :align: left :class: list-table * - Type - Description * - BarcodeConst.BarcodeSettings - [BarcodeConst.BarcodeSettings](BarcodeConst.md#barcodeconstbarcodesettings) ``` Retrieves the current decode mode. [BarcodeConst.BarcodeSettings.DECODE_MODE_CONTINUOUS](BarcodeConst.md#barcodeconst-barcodesettings) or [BarcodeConst.BarcodeSettings.DECODE_MODE_SINGLE](BarcodeConst.md#barcodeconst-barcodesettings) ### Sample Code ```java BarcodeConst.BarcodeSettings mode = BarcodeManager.getInstance().getDecodeMode(); ``` --- ## setEncodeMode ### Method Signature ``` public void setEncodeMode(BarcodeConst.QREncodeMode mode) ``` ### Parameters ```{list-table} :align: left :class: list-table * - Parameter - Type - Description * - mode - BarcodeConst.QREncodeMode - [BarcodeConst.QREncodeMode](BarcodeConst.md#barcodeconst-qrencodemode) ``` Sets the encode mode. ### Sample Code ```java BarcodeManager.getInstance().setDecodeMode(BarcodeConst.QREncodeMode.AUTO); ``` --- ## getEncodeMode ### Method Signature ``` public BarcodeConst.QREncodeMode getEncodeMode() ``` ### Return Value ```{list-table} :align: left :class: list-table * - Type - Description * - BarcodeConst.QREncodeMode - [BarcodeConst.QREncodeMode](BarcodeConst.md#barcodeconst-qrencodemode) ``` Retrieves the current encode mode. ### Sample Code ```java BarcodeConst.QREncodeMode mode = BarcodeManager.getInstance().getEncodeMode(); ``` --- ## initialize ### Method Signature ```java public void initialize(Context context) ``` ### Parameters ```{list-table} :align: left :class: list-table * - Parameter - Type - Description * - context - Context - Application context ``` Sets the application context. This method is automatically called during `AsReader` initialization, so it does not need to be called explicitly. --- ## startDecode ### Method Signature ```java public void startDecode() ``` Starts decoding. Decoded results are returned via the `BarcodeManagerCallback` method [`onReceivedBarcodeDecodeData`](BarcodeManagerCallback.md#onreceivedbarcodedecodedata). ### Sample Code ```java BarcodeManager.getInstance().startDecode(); ``` --- ## startDecode with Parameters ### Method Signature ```java public void startDecode(@IntRange(from = 0, to = 255) int count, @IntRange(from = 0, to = 255) int time) ``` Starts decoding with specified count and time. Results are returned via `BarcodeManagerCallback.onReceivedBarcodeDecodeData`. ### Sample Code ```java BarcodeManager.getInstance().startDecode(10, 10); ``` --- ## stopDecode ### Method Signature ```java public void stopDecode() ``` Stops decoding. ### Sample Code ```java BarcodeManager.getInstance().stopDecode(); ``` --- ## factoryDefault ### Method Signature ```java public void factoryDefault() ``` Resets the AsReader module to factory settings. Results are returned via `BarcodeManagerCallback.onReceivedResponse`. ### Sample Code ```java BarcodeManager.getInstance().factoryDefault(); ``` --- ## getStopCondition ### Method Signature ```java public void getStopCondition() ``` Retrieves the configured stop condition. Results are returned via `BarcodeManagerCallback.onReceivedResponse`. ### Sample Code ```java BarcodeManager.getInstance().getStopCondition(); ``` --- ## setBarcodeSettings ### Method Signature ```java public void setBarcodeSettings(BarcodeConst.MemoryType memoryType, BarcodeConst.BarcodeSettings settingsType) ``` ### Parameters ```{list-table} :align: left :class: list-table * - Parameter - Type - Description * - memoryType - BarcodeConst.MemoryType - [BarcodeConst.MemoryType](BarcodeConst.md#barcodeconst-memorytype) * - settingsType - BarcodeConst.BarcodeSettings - [BarcodeConst.BarcodeSettings](BarcodeConst.md#barcodeconstbarcodesettings) ``` Sets barcode configuration items. Results are returned via `BarcodeManagerCallback.onReceivedResponse`. ### Sample Code ```java BarcodeManager.getInstance().setBarcodeSettings( BarcodeConst.MemoryType.MEMORY_TYPE_PERMANENT, BarcodeConst.BarcodeSettings.CHARACTER_NONE ); ``` --- ## getBarcodeSettings ### Method Signature ```java public void getBarcodeSettings(BarcodeConst.BarcodeSettings settingsType) ``` ### Parameters ```{list-table} :align: left :class: list-table * - Parameter - Type - Description * - settingsType - BarcodeConst.BarcodeSettings - [BarcodeConst.BarcodeSettings](BarcodeConst.md#barcodeconstbarcodesettings) ``` Retrieves barcode configuration items. Results are returned via `BarcodeManagerCallback.onReceivedResponse`. ### Sample Code ```java BarcodeManager.getInstance().setBarcodeSettings( BarcodeConst.BarcodeSettings.CHARACTER_CODE_ID_SYMBOL ); ``` --- ## setSymbologyAllEnable ### Method Signature ```java public void setSymbologyAllEnable(BarcodeConst.MemoryType memoryType, boolean isEnable) ``` ### Parameters ```{list-table} :align: left :class: list-table * - Parameter - Type - Description * - memoryType - BarcodeConst.MemoryType - [BarcodeConst.MemoryType](BarcodeConst.md#barcodeconst-memorytype) * - isEnable - boolean - Enable or disable all barcode types: true: On false: Off ``` Enables or disables reading of all barcode types. Results are returned via `BarcodeManagerCallback.onReceivedResponse`. ### Sample Code ```java BarcodeManager.getInstance().setSymbologyAllEnable( BarcodeConst.MemoryType.MEMORY_TYPE_PERMANENT, true ); ``` --- ## setSymbologySettings (single) ### Method Signature ```java public void setSymbologySettings(BarcodeConst.MemoryType memoryType, Symbology symbology, boolean isEnable) ``` ### Parameters ```{list-table} :align: left :class: list-table * - Parameter - Type - Description * - memoryType - BarcodeConst.MemoryType - [BarcodeConst.MemoryType](BarcodeConst.md#barcodeconst-memorytype) * - symbology - Symbology - [Symbology](Symbology.md) * - isEnable - boolean - Enable or disable the specified barcode type ``` Sets reading on/off for a specific barcode type. Results are returned via `BarcodeManagerCallback.onReceivedResponse`. ### Sample Code ```java BarcodeManager.getInstance().setSymbologySettings( BarcodeConst.MemoryType.MEMORY_TYPE_PERMANENT, Symbology.UPC_A, true ); ``` --- ## setSymbologySettings (batch) ### Method Signature ```java public void setSymbologySettings(BarcodeConst.MemoryType memoryType, ArrayList symbologyInfoList) ``` ### Parameters ```{list-table} :align: left :class: list-table * - Parameter - Type - Description * - memoryType - BarcodeConst.MemoryType - [BarcodeConst.MemoryType](BarcodeConst.md#barcodeconst-memorytype) * - symbologyInfoList - ArrayList - Array of [SymbologyInfoModel](SymbologyInfoModel.md) ``` Sets reading on/off for multiple barcode types. Results are returned via `BarcodeManagerCallback.onReceivedResponse`. ### Sample Code ```java SymbologyInfoModel model1 = new SymbologyInfoModel(Symbology.UPC_A, true); SymbologyInfoModel model2 = new SymbologyInfoModel(Symbology.UPC_E, true); ArrayList infoModelArrayList = new ArrayList<>(); infoModelArrayList.add(model1); infoModelArrayList.add(model2); BarcodeManager.getInstance().setSymbologySettings( BarcodeConst.MemoryType.MEMORY_TYPE_PERMANENT, infoModelArrayList ); ``` --- ## setOCRSettings (single) ### Method Signature ```java public void setOCRSettings(BarcodeConst.MemoryType memoryType, OCR ocr, boolean isEnable) ``` ### Parameters ```{list-table} :align: left :class: list-table * - Parameter - Type - Description * - memoryType - BarcodeConst.MemoryType - [BarcodeConst.MemoryType](BarcodeConst.md#barcodeconst-memorytype) * - ocr - OCR - [OCR](ocr.md) * - isEnable - boolean - Enable or disable reading for the specified OCR type: true: On false: Off ``` Sets whether to read a specified OCR type. ### Sample Code ```java BarcodeManager.getInstance().setOCRSettings( BarcodeConst.MemoryType.MEMORY_TYPE_PERMANENT, OCR.OCR_A, true ); ``` --- ## setOCRSettings (batch) ### Method Signature ```java public void setOCRSettings(BarcodeConst.MemoryType memoryType, ArrayList ocrInfoList) ``` ### Parameters ```{list-table} :align: left :class: list-table * - Parameter - Type - Description * - memoryType - BarcodeConst.MemoryType - [BarcodeConst.MemoryType](BarcodeConst.md#barcodeconst-memorytype) * - ocrInfoList - ArrayList - Array of [OCRInfoModel](OCRInfoModel.md) ``` Sets reading on/off for multiple OCR types. Results are returned via `BarcodeManagerCallback.onReceivedResponse`. ### Sample Code ```java OCRInfoModel model = new OCRInfoModel(OCR.OCR_A, true); ArrayList infoModelArrayList = new ArrayList<>(); infoModelArrayList.add(model); BarcodeManager.getInstance().setOCRSettings( BarcodeConst.MemoryType.MEMORY_TYPE_PERMANENT, infoModelArrayList ); ``` --- ## getSymbologySettings (single) ### Method Signature ```java public void getSymbologySettings(Symbology symbology) ``` ### Parameters ```{list-table} :align: left :class: list-table * - Parameter - Type - Description * - symbology - Symbology - [Symbology](Symbology.md) ``` Retrieves the current configuration for a specific barcode type. Results are returned via `BarcodeManagerCallback.onReceivedResponse`. ### Sample Code ```java BarcodeManager.getInstance().getSymbologySettings(Symbology.UPC_A); ``` --- ## getSymbologySettings (batch) ### Method Signature ```java public void getSymbologySettings(ArrayList symbologyList) ``` ### Parameters ```{list-table} :align: left :class: list-table * - Parameter - Type - Description * - symbologyList - ArrayList - ArrayList of [Symbology](Symbology.md) ``` Retrieves the current configuration for multiple barcode types. Results are returned via `BarcodeManagerCallback.onReceivedResponse`. ### Sample Code ```java ArrayList symbolArrayList = new ArrayList<>(); symbolArrayList.add(Symbology.UPC_A); BarcodeManager.getInstance().getSymbologySettings(symbolArrayList); ``` --- ## getOCRSettings (single) ### Method Signature ```java public void getOCRSettings(OCR ocr) ``` ### Parameters ```{list-table} :align: left :class: list-table * - Parameter - Type - Description * - ocr - OCR - [OCR](ocr.md) ``` Retrieves the configuration for a specific OCR type. Results are returned via `BarcodeManagerCallback.onReceivedResponse`. ### Sample Code ```java BarcodeManager.getInstance().getOCRSettings(OCR.OCR_A); ``` --- ## getOCRSettings (batch) ### Method Signature ```java public void getOCRSettings(ArrayList ocrList) ``` ### Parameters ```{list-table} :align: left :class: list-table * - Parameter - Type - Description * - ocrList - ArrayList - Array of [OCR](ocr.md) ``` Retrieves the configuration for multiple OCR types. Results are returned via `BarcodeManagerCallback.onReceivedResponse`. ### Sample Code ```java ArrayList ocrArrayList = new ArrayList<>(); ocrArrayList.add(OCR.OCR_A); BarcodeManager.getInstance().getOCRSettings(ocrArrayList); ``` --- ## getSystemBeep ### Method Signature ```java public BarcodeConst.SystemBeepSoundType getSystemBeep() ``` ### Return Value ```{list-table} :align: left :class: list-table * - Type - Description * - BarcodeConst.SystemBeepSoundType - [BarcodeConst.SystemBeepSoundType](BarcodeConst.md#barcodeconst-systembeepsoundtype) ``` Retrieves the beep sound type. ### Sample Code ```java BarcodeConst.SystemBeepSoundType soundType = BarcodeManager.getInstance().getSystemBeep(); ``` --- ## setNotisEditing ### Method Signature ```java public void setNotisEditing(BarcodeConst.MemoryType memoryType, boolean isEnabled) ``` ### Parameters ```{list-table} :align: left :class: list-table * - Parameter - Type - Description * - memoryType - BarcodeConst.MemoryType - [BarcodeConst.MemoryType](BarcodeConst.md#barcodeconst-memorytype) * - isEnabled - boolean - Enable or disable Notis editing: true: On false: Off ``` Sets whether Notis editing is enabled. ### Sample Code ```java BarcodeManager.getInstance().setNotisEditing( BarcodeConst.MemoryType.MEMORY_TYPE_PERMANENT, true ); ``` --- ## getNotisEditing ### Method Signature ```java public void getNotisEditing() ``` Retrieves the current Notis editing setting. Results are returned via `BarcodeManagerCallback.onReceivedResponse`. ### Sample Code ```java BarcodeManager.getInstance().getNotisEditing(); ``` --- ## setPresentationMode ### Method Signature ```java public void setPresentationMode(BarcodeConst.MemoryType memoryType, BarcodeConst.BarcodeSettings settingsType) ``` ### Parameters ```{list-table} :align: left :class: list-table * - Parameter - Type - Description * - memoryType - BarcodeConst.MemoryType - [BarcodeConst.MemoryType](BarcodeConst.md#barcodeconst-memorytype) * - settingsType - BarcodeConst.BarcodeSettings - [BarcodeConst.BarcodeSettings](BarcodeConst.md#barcodeconst-barcodesettings) ``` Sets the trigger key mode (standard or presentation). - `TRIGGER_PRESENTATION`: mode on - `TRIGGER_STANDARD`: mode off Presentation mode automatically triggers a scan when a barcode is detected within the reading area. ### Sample Code ```java BarcodeManager.getInstance().setPresentationMode( BarcodeConst.MemoryType.MEMORY_TYPE_PERMANENT, BarcodeConst.BarcodeSettings.TRIGGER_PRESENTATION ); ``` --- ## getPresentationMode ### Method Signature ```java public void getPresentationMode() ``` Retrieves the current trigger key mode. ### Sample Code ```java BarcodeManager.getInstance().getPresentationMode(); ```