BarcodeManager

getInstance

Method Signature

public static BarcodeManager getInstance()

Return Value

Type

Description

BarcodeManager

Singleton object BarcodeManager

Creates a singleton BarcodeManager object.

Sample Code

BarcodeManager barcodeManager = BarcodeManager.getInstance();

getCharacterStatus

Method Signature

public BarcodeConst.BarcodeSettings getCharacterStatus()

Return Value

Type

Description

BarcodeConst.BarcodeSettings

BarcodeConst.BarcodeSettings

Retrieves the current decode status.

Sample Code

BarcodeConst.BarcodeSettings setting = BarcodeManager.getInstance().getCharacterStatus();

setCallback

Method Signature

public void setCallback(BarcodeManagerCallback callback)

Parameters

Parameter

Type

Description

callback

BarcodeManagerCallback

BarcodeManagerCallback

Sets the callback.

Sample Code

BarcodeManager.getInstance().setCallback(this);

setDecodeMode

Method Signature

public void setDecodeMode(BarcodeConst.BarcodeSettings mode)

Parameters

Parameter

Type

Description

mode

BarcodeConst.BarcodeSettings

BarcodeConst.BarcodeSettings

Sets the decode mode.
BarcodeConst.BarcodeSettings.DECODE_MODE_CONTINUOUS
or
BarcodeConst.BarcodeSettings.DECODE_MODE_SINGLE

Sample Code

BarcodeManager.getInstance().setDecodeMode(BarcodeConst.BarcodeSettings.DECODE_MODE_SINGLE);

getDecodeMode

Method Signature

public BarcodeConst.BarcodeSettings getDecodeMode()

Return Value

Type

Description

BarcodeConst.BarcodeSettings

BarcodeConst.BarcodeSettings

Retrieves the current decode mode.
BarcodeConst.BarcodeSettings.DECODE_MODE_CONTINUOUS
or
BarcodeConst.BarcodeSettings.DECODE_MODE_SINGLE

Sample Code

BarcodeConst.BarcodeSettings mode = BarcodeManager.getInstance().getDecodeMode();

setEncodeMode

Method Signature

public void setEncodeMode(BarcodeConst.QREncodeMode mode)

Parameters

Parameter

Type

Description

mode

BarcodeConst.QREncodeMode

BarcodeConst.QREncodeMode

Sets the encode mode.

Sample Code

BarcodeManager.getInstance().setDecodeMode(BarcodeConst.QREncodeMode.AUTO);

getEncodeMode

Method Signature

public BarcodeConst.QREncodeMode getEncodeMode()

Return Value

Type

Description

BarcodeConst.QREncodeMode

BarcodeConst.QREncodeMode

Retrieves the current encode mode.

Sample Code

BarcodeConst.QREncodeMode mode = BarcodeManager.getInstance().getEncodeMode();

initialize

Method Signature

public void initialize(Context context)

Parameters

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

public void startDecode()

Starts decoding.
Decoded results are returned via the BarcodeManagerCallback method onReceivedBarcodeDecodeData.

Sample Code

BarcodeManager.getInstance().startDecode();

startDecode with Parameters

Method Signature

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

BarcodeManager.getInstance().startDecode(10, 10);

stopDecode

Method Signature

public void stopDecode()

Stops decoding.

Sample Code

BarcodeManager.getInstance().stopDecode();

factoryDefault

Method Signature

public void factoryDefault()

Resets the AsReader module to factory settings.
Results are returned via BarcodeManagerCallback.onReceivedResponse.

Sample Code

BarcodeManager.getInstance().factoryDefault();

getStopCondition

Method Signature

public void getStopCondition()

Retrieves the configured stop condition.
Results are returned via BarcodeManagerCallback.onReceivedResponse.

Sample Code

BarcodeManager.getInstance().getStopCondition();

setBarcodeSettings

Method Signature

public void setBarcodeSettings(BarcodeConst.MemoryType memoryType, BarcodeConst.BarcodeSettings settingsType)

Parameters

Parameter

Type

Description

memoryType

BarcodeConst.MemoryType

BarcodeConst.MemoryType

settingsType

BarcodeConst.BarcodeSettings

BarcodeConst.BarcodeSettings

Sets barcode configuration items.
Results are returned via BarcodeManagerCallback.onReceivedResponse.

Sample Code

BarcodeManager.getInstance().setBarcodeSettings(
    BarcodeConst.MemoryType.MEMORY_TYPE_PERMANENT,
    BarcodeConst.BarcodeSettings.CHARACTER_NONE
);

getBarcodeSettings

Method Signature

public void getBarcodeSettings(BarcodeConst.BarcodeSettings settingsType)

Parameters

Parameter

Type

Description

settingsType

BarcodeConst.BarcodeSettings

BarcodeConst.BarcodeSettings

Retrieves barcode configuration items.
Results are returned via BarcodeManagerCallback.onReceivedResponse.

Sample Code

BarcodeManager.getInstance().setBarcodeSettings(
    BarcodeConst.BarcodeSettings.CHARACTER_CODE_ID_SYMBOL
);

setSymbologyAllEnable

Method Signature

public void setSymbologyAllEnable(BarcodeConst.MemoryType memoryType, boolean isEnable)

Parameters

Parameter

Type

Description

memoryType

BarcodeConst.MemoryType

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

BarcodeManager.getInstance().setSymbologyAllEnable(
    BarcodeConst.MemoryType.MEMORY_TYPE_PERMANENT, true
);

setSymbologySettings (single)

Method Signature

public void setSymbologySettings(BarcodeConst.MemoryType memoryType, Symbology symbology, boolean isEnable)

Parameters

Parameter

Type

Description

memoryType

BarcodeConst.MemoryType

BarcodeConst.MemoryType

symbology

Symbology

Symbology

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

BarcodeManager.getInstance().setSymbologySettings(
    BarcodeConst.MemoryType.MEMORY_TYPE_PERMANENT, Symbology.UPC_A, true
); 

setSymbologySettings (batch)

Method Signature

public void setSymbologySettings(BarcodeConst.MemoryType memoryType, ArrayList<SymbologyInfoModel> symbologyInfoList)

Parameters

Parameter

Type

Description

memoryType

BarcodeConst.MemoryType

BarcodeConst.MemoryType

symbologyInfoList

ArrayList

Array of SymbologyInfoModel

Sets reading on/off for multiple barcode types.
Results are returned via BarcodeManagerCallback.onReceivedResponse.

Sample Code

SymbologyInfoModel model1 = new SymbologyInfoModel(Symbology.UPC_A, true);
SymbologyInfoModel model2 = new SymbologyInfoModel(Symbology.UPC_E, true);
ArrayList<SymbologyInfoModel> infoModelArrayList = new ArrayList<>();
infoModelArrayList.add(model1);
infoModelArrayList.add(model2);
BarcodeManager.getInstance().setSymbologySettings(
    BarcodeConst.MemoryType.MEMORY_TYPE_PERMANENT, infoModelArrayList
);

setOCRSettings (single)

Method Signature

public void setOCRSettings(BarcodeConst.MemoryType memoryType, OCR ocr, boolean isEnable)

Parameters

Parameter

Type

Description

memoryType

BarcodeConst.MemoryType

BarcodeConst.MemoryType

ocr

OCR

OCR

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

BarcodeManager.getInstance().setOCRSettings(
    BarcodeConst.MemoryType.MEMORY_TYPE_PERMANENT, OCR.OCR_A, true
);

setOCRSettings (batch)

Method Signature

public void setOCRSettings(BarcodeConst.MemoryType memoryType, ArrayList<OCRInfoModel> ocrInfoList)

Parameters

Parameter

Type

Description

memoryType

BarcodeConst.MemoryType

BarcodeConst.MemoryType

ocrInfoList

ArrayList

Array of OCRInfoModel

Sets reading on/off for multiple OCR types.
Results are returned via BarcodeManagerCallback.onReceivedResponse.

Sample Code

OCRInfoModel model = new OCRInfoModel(OCR.OCR_A, true);
ArrayList<OCRInfoModel> infoModelArrayList = new ArrayList<>();
infoModelArrayList.add(model);
BarcodeManager.getInstance().setOCRSettings(
    BarcodeConst.MemoryType.MEMORY_TYPE_PERMANENT, infoModelArrayList
);

getSymbologySettings (single)

Method Signature

public void getSymbologySettings(Symbology symbology)

Parameters

Parameter

Type

Description

symbology

Symbology

Symbology

Retrieves the current configuration for a specific barcode type.
Results are returned via BarcodeManagerCallback.onReceivedResponse.

Sample Code

BarcodeManager.getInstance().getSymbologySettings(Symbology.UPC_A);

getSymbologySettings (batch)

Method Signature

public void getSymbologySettings(ArrayList<Symbology> symbologyList)

Parameters

Parameter

Type

Description

symbologyList

ArrayList

ArrayList of Symbology

Retrieves the current configuration for multiple barcode types.
Results are returned via BarcodeManagerCallback.onReceivedResponse.

Sample Code

ArrayList<Symbology> symbolArrayList = new ArrayList<>();
symbolArrayList.add(Symbology.UPC_A);
BarcodeManager.getInstance().getSymbologySettings(symbolArrayList);

getOCRSettings (single)

Method Signature

public void getOCRSettings(OCR ocr)

Parameters

Parameter

Type

Description

ocr

OCR

OCR

Retrieves the configuration for a specific OCR type.
Results are returned via BarcodeManagerCallback.onReceivedResponse.

Sample Code

BarcodeManager.getInstance().getOCRSettings(OCR.OCR_A);

getOCRSettings (batch)

Method Signature

public void getOCRSettings(ArrayList<OCR> ocrList)

Parameters

Parameter

Type

Description

ocrList

ArrayList

Array of OCR

Retrieves the configuration for multiple OCR types.
Results are returned via BarcodeManagerCallback.onReceivedResponse.

Sample Code

ArrayList<OCR> ocrArrayList = new ArrayList<>();
ocrArrayList.add(OCR.OCR_A);
BarcodeManager.getInstance().getOCRSettings(ocrArrayList);

getSystemBeep

Method Signature

public BarcodeConst.SystemBeepSoundType getSystemBeep()

Return Value

Type

Description

BarcodeConst.SystemBeepSoundType

BarcodeConst.SystemBeepSoundType

Retrieves the beep sound type.

Sample Code

BarcodeConst.SystemBeepSoundType soundType = BarcodeManager.getInstance().getSystemBeep();

setNotisEditing

Method Signature

public void setNotisEditing(BarcodeConst.MemoryType memoryType, boolean isEnabled)

Parameters

Parameter

Type

Description

memoryType

BarcodeConst.MemoryType

BarcodeConst.MemoryType

isEnabled

boolean

Enable or disable Notis editing:
true: On
false: Off

Sets whether Notis editing is enabled.

Sample Code

BarcodeManager.getInstance().setNotisEditing(
    BarcodeConst.MemoryType.MEMORY_TYPE_PERMANENT, true
);

getNotisEditing

Method Signature

public void getNotisEditing()

Retrieves the current Notis editing setting.
Results are returned via BarcodeManagerCallback.onReceivedResponse.

Sample Code

BarcodeManager.getInstance().getNotisEditing();

setPresentationMode

Method Signature

public void setPresentationMode(BarcodeConst.MemoryType memoryType, BarcodeConst.BarcodeSettings settingsType)

Parameters

Parameter

Type

Description

memoryType

BarcodeConst.MemoryType

BarcodeConst.MemoryType

settingsType

BarcodeConst.BarcodeSettings

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

BarcodeManager.getInstance().setPresentationMode(
    BarcodeConst.MemoryType.MEMORY_TYPE_PERMANENT,
    BarcodeConst.BarcodeSettings.TRIGGER_PRESENTATION
);

getPresentationMode

Method Signature

public void getPresentationMode()

Retrieves the current trigger key mode.

Sample Code

BarcodeManager.getInstance().getPresentationMode();