Android API Reference
BarcodeReader Class
Initialize
| Method | Description |
|---|---|
BarcodeReader |
Initialization of BarcodeReader object. |
Video Decoding Methods
| Method | Description |
|---|---|
setCameraEnhancer |
Bind a Camera Enhancer instance to the Barcode Reader. |
startScanning |
Start the barcode reading thread. |
stopScanning |
Stop the barcode reading thread. |
setTextResultListener |
Set TextResult listener to get result from the callback method when barcode is decoded. |
setIntermediateResultListener |
Set intermediateResult listener to get intermediate result from the callback method. |
setMinImageReadingInterval |
Set the minimum interval between two barcode decoding. |
getMinImageReadingInterval |
Get the minimum interval between two barcode decoding. |
setImageSource |
Set the ImageSource as the source of video streaming. |
enableResultVerification |
Enable Result Verification feature to improve the accuracy of barcode results for video streaming barcode decoding. |
enableDuplicateFilter |
Enable Duplicate Filter feature to filter out the duplicate results in the period of duplicateForgetTime for video barcode decoding. |
setDuplicateForgetTime |
Set the property of duplicateForgetTime, Default value is 3000(ms). |
getDuplicateForgetTime |
Get the property of duplicateForgetTime. |
Note:
setTextResultCallbackis deprecated, please usesetTextResultListenerinstead.setIntermediateResultCallbackis deprecated, please usesetIntermediateResultListenerinstead.
Image Decoding Methods
| Method | Description |
|---|---|
decodeBuffer |
Decode barcodes from raw buffer. |
decodeFile |
Decode barcodes from a specified image file. |
decodeFileInMemory |
Decode barcodes from an image file in memory. |
decodeBase64String |
Decode barcodes from a base64 encoded string. |
decodeBufferedImage |
Decodes barcode from a buffered image (bitmap). |
License
| Method | Description |
|---|---|
initLicense |
Read product key and activate the SDK. |
setDeviceFriendlyName |
Sets a human-readable name that identifies the device. |
Note:
The following license activation methods are deprecated:
outputLicenseToStringinitLicenseFromDLSinitLicenseFromServerinitLicenseFromLicenseContentPlease use
initLicenseto activate the license.
Parameter and Runtime Settings
Basic
| Method | Description |
|---|---|
getRuntimeSettings |
Get current runtime settings. |
updateRuntimeSettings (with struct) |
Modify and update the current runtime settings. |
updateRuntimeSettings (with preset template) |
Update runtime settings from one of the preset templates. |
resetRuntimeSettings |
Reset runtime settings to default. |
Advanced
| Method | Description |
|---|---|
initRuntimeSettingsWithFile |
Initialize runtime settings with the settings in a given JSON file. |
initRuntimeSettingsWithString |
Initialize runtime settings with the settings in a given JSON string. |
appendTplFileToRuntimeSettings |
Append a new template file to the current runtime settings. |
appendTplStringToRuntimeSettings |
Append a new template string to the current runtime settings. |
getAllParameterTemplateNames |
Gets the parameter templates name array. |
outputSettingsToFile |
Output runtime settings to a settings file (JSON file). |
outputSettingsToString |
Output runtime settings to a string. |
setModeArgument |
Set argument value for the specified mode parameter. |
getModeArgument |
Get argument value for the specified mode parameter. |
Result
| Method | Description |
|---|---|
initIntermediateResult |
Inits an intermediateResult struct with default values. |
getIntermediateResults |
Get intermediate results. |
decodeIntermediateResults |
Decodes barcode from intermediate results. |
Status Retrieval
| Method | Description |
|---|---|
getVersion |
Get version information of SDK. |
setLogConfig |
Set the directory and the saving mode of log. It helps you on debugging. |
Auxiliary Classes
AztecDetailsBarcodeReaderExceptionContourDataMatrixDetailsExtendedResultFurtherModesImageDataIntermediateResultLineSegmentLocalizationResultOneDCodeDetailsPDF417DetailsPublicRuntimeSettingsQRCodeDetailsQuadrilateralRegionDefinitionRegionOfInterestSamplingImageDataTextResult
Note:
DMDLSConnectionParametersis deprecated due to the update of the license. Please use the methodinitLicenseto activate the license instead.
Interfaces
| Interfaces | Description |
|---|---|
TextResultListener |
The interface to handle callback when text results are returned. |
IntermediateResultListener |
The interface to handle callback when intermediate results are returned. |
DBRLicenseVerificationListener |
The interface to handle callback for method initLicense. |
ImageSource |
Interface for producers of images. It can be implemented by programmers to support other image sources, such as external cameras or image filesets. |
Note:
TextResultCallbackis deprecated, please useTextResultListenerinstead.IntermediateResultCallbackis deprecated, please useIntermediateResultListenerinstead.DBRServerLicenseVerificationListeneris deprecated. It handles callback when using methodinitLicenseFromServer, which is also deprecated. Please useinitLicenseinstead.DBRDLSLicenseVerificationListeneris deprecated. It handles callback when using methodinitLicenseFromDLS, which is also deprecated. Please useinitLicenseinstead.
Enumerations
EnumBarcodeColourModeEnumBarcodeComplementModeEnumBarcodeFormatEnumBarcodeFormat_2EnumBinarizationModeEnumColourClusteringModeEnumColourConversionModeEnumConflictModeEnumDeblurModeEnumDeformationResistingModeEnumDPMCodeReadingModeEnumGrayscaleTransformationModeEnumIMResultDataTypeEnumImagePixelFormatEnumImagePreprocessingModeEnumIntermediateResultSavingModeEnumIntermediateResultTypeEnumLocalizationModeEnumPDFReadingModeEnumPresetTemplateEnumQRCodeErrorCorrectionLevelEnumRegionPredetectionModeEnumResultCoordinateTypeEnumResultTypeEnumScaleUpModeEnumTerminatePhaseEnumTextFilterModeEnumTextResultOrderModeEnumTextureDetectionMode
Note:
The following Enumerations are deprecated and will be removed in the future.
EnumProductEnumDMChargeWayEnumDMLicenseModuleEnumDMUUIDGenerationMethod
Others
View the Error Codes