Dev Center
Swift
Objective-C
Table of contents

Thanks for downloading Dynamsoft Barcode Reader Package!

Your download will start shortly. If your download does not begin, click here to retry.

How to Upgrade

From Version 9.x to 10.x

Dynamsoft Barcode Reader SDK has been refactored to integrate with DynamsoftCaptureVision (DCV) architecture. To upgrade from version 9.x or earlier to 10.x, we recommend you to follow the User Guide and re-write your codes.

Update the Libraries to 10.x Version

The Dynamsoft Barcode Reader SDK has been split into multiple libraries from the previous single library, and the dependency configuration in the app\build.gradle file needs to be updated accordingly.

  • Local Dependency Put the following aar files into libs directory and update app\build.gradle file:

    • DynamsoftCaptureVisionRouter.aar
    • DynamsoftBarcodeReader.aar
    • DynamsoftImageProcessing.aar
    • DynamsoftCore.aar
    • DynamsoftLicense.aar
    • DynamsoftCameraEnhancer.aar(optional)

      dependencies {
          implementation fileTree(include: ['*.aar'], dir: 'libs')   
      }
      
  • Remote Dependency(Maven) update app\build.gradle file:

      dependencies {
          implementation 'com.dynamsoft:dynamsoftcapturevisionrouter:{version-number}'
          implementation 'com.dynamsoft:dynamsoftbarcodereader:{version-number}'
          implementation 'com.dynamsoft:dynamsoftcameraenhancer:{version-number}' //optional
          implementation 'com.dynamsoft:dynamsoftcore:{version-number}'
          implementation 'com.dynamsoft:dynamsoftlicense:{version-number}'
          implementation 'com.dynamsoft:dynamsoftimageprocessing:{version-number}'
          implementation 'com.dynamsoft:dynamsoftutility:{version-number}'
      }
    

    Note: Please view user guide for the correct version number.

Update the License Activation Code

Starting from 10.0, we have unified the API for setting licenses across different Dynamsoft products.

Old APIs New APIs
BarcodeReader.initLicense LicenseManager.initLicense
  • Java code in 9.x:
BarcodeReader.initLicense("Put your license", new DBRLicenseVerificationListener() {
    @Override
    public void DBRLicenseVerificationCallback(boolean isSuccess, Exception error) {
        if(!isSuccess){
            error.printStackTrace();
        }
    }
});
  • Java code in 10.x:
LicenseManager.initLicense("Put your license", this, new LicenseVerificationListener() {
    @Override
    public void onLicenseVerified(boolean isSuccess, Exception error) {
        if(!isSuccess){
            error.printStackTrace();
        }
    }
});

Update Single Image Decoding APIs

The APIs for decoding single image has been adjusted as follows:

Old APIs New APIs
BarcodeReader.decodeFile CaptureVisionRouter.capture(String filePath, String templateName)
BarcodeReader.decodeFileInMemory CaptureVisionRouter.capture(byte[] fileBytes, String templateName)
BarcodeReader.decodeBuffer CaptureVisionRouter.capture(ImageData imageData, String templateName)
BarcodeReader.decodeBufferedImage CaptureVisionRouter.capture(Bitmap bitmap, String templateName)
class TextResult class BarcodeResultItem
BarcodeReader.decodeBase64String Currently not available.

Update Video Streaming Decoding APIs

The APIs for decoding video frames has been adjusted as follows:

Old APIs New APIs
BarcodeReader.setImageSource CaptureVisionRouter.setInput
BarcodeReader.startScanning CaptureVisionRouter.startCapturing
BarcodeReader.stopScanning CaptureVisionRouter.stopCapturing
BarcodeReader.setTextResultListener CaptureVisionRouter.addResultReceiver
BarcodeReader.setIntermediateResultListener CaptureVisionRouter.IntermediateResultManager.addResultReceiver
BarcodeReader.set/getMinImageReadingInterval SimplifiedCaptureVisionSettings.minImageCaptureInterval
BarcodeReader.enableResultVerification MultiFrameResultCrossFilter.enableResultCrossVerification
BarcodeReader.enableDuplicateFilter MultiFrameResultCrossFilter.enableResultDeduplication
interface ImageSource interface ImageSourceAdapter
interface TextResultListener interface CapturedResultReceiver
interface IntermediateResultListener interface IntermediateResultReceiver
class TextResult class BarcodeResultItem

Migrate Your Templates

The template system is upgraded. The template you used for the previous version can’t be directly recognized by the new version. Please download the TemplateConverter tool or contact us to upgrade your template.

The template-based APIs have been updated as follows:

Old APIs New APIs
BarcodeReader.initRuntimeSettingsWithFile CaptureVisionRouter.initSettingsFromFile
BarcodeReader.initRuntimeSettingsWithString CaptureVisionRouter.initSettings
BarcodeReader.outputSettingsToFile CaptureVisionRouter.outputSettingsToFile
BarcodeReader.outputSettingsToString CaptureVisionRouter.outputSettings
BarcodeReader.resetRuntimeSettings CaptureVisionRouter.resetSettings
BarcodeReader.appendTplFileToRuntimeSettings Not available.
BarcodeReader.appendTplStringToRuntimeSettings Not available.

Migrate Your PublicRuntimeSettings

The class PublicRuntimeSettings has been refactored. It retains commonly used properties while removing the previously complex property settings, which are now exclusively supported through templates.

The APIs for accessing and updating PublicRuntimeSettings has been adjusted as follows:

Old APIs New APIs
BarcodeReader.getRuntimeSettings CaptureVisionRouter.getSimplifiedSettings
BarcodeReader.updateRuntimeSettings CaptureVisionRouter.updateSettings

Migrate to SimplifiedCaptureVisionSettings

The following properties are replaced by similar properties under SimplifiedCaptureVisionSettings. They can also be set via a template file(String).

PublicRuntimeSettings Property SimplifiedCaptureVisionSettings Property Template File Parameter
region roi & roiMeasuredInPercentage TargetROIDef.Location.Offset
timeout timeout CaptureVisionTemplates.Timeout

Migrate to SimplifiedBarcodeReaderSettings

The following properties are replaced by similar properties under SimplifiedBarcodeReaderSettings. The majority of them can also be set via a template file(String).

PublicRuntimeSettings Property SimplifiedBarcodeReaderSettings Property Template File Parameter
minBarcodeTextLength minBarcodeTextLength BarcodeFormatSpecification.BarcodeTextLengthRangeArray
minResultConfidence minResultConfidence BarcodeFormatSpecification.MinResultConfidence
localizationModes localizationModes BarcodeReaderTaskSetting.LocationModes
expectedBarcodesCount expectedBarcodesCount BarcodeReaderTaskSetting.ExpectedBarcodesCount
barcodeFormatIds barcodeFormatIds BarcodeReaderTaskSetting.BarcodeFormatIds
barcodeFormatIds_2 barcodeFormatIds BarcodeReaderTaskSetting.BarcodeFormatIds
deblurModes deblurModes BarcodeReaderTaskSetting.DeblurModes
deblurLevel deblurModes BarcodeReaderTaskSetting.DeblurModes
maxAlgorithmThreadCount maxThreadsInOneTask BarcodeReaderTaskSetting.MaxThreadsInOneTask

Remarks:

  • The 2 groups of barcode formats are merged.
  • DeblurLevel is deprecated. You can use DeblurModes instead.
FurtherModes Property SimplifiedBarcodeReaderSettings Property Template File Parameter
grayscaleTransformationModes grayscaleTransformationModes ImageParameter.GrayscaleTransformationModes
imagePreprocessingModes grayscaleEnhancementModes ImageParameter.GrayscaleEnhancementModes
scaleDownThreshold scaleDownThreshold ImageParameter.ScaleDownThreshold

Remarks: The mode IPM_MORPHOLOGY of imagePreprocessingModes is migrated to BinarizationModes. The mode arguments MorphOperation, MorphOperationKernelSizeX, MorphOperationKernelSizeY, MorphShape are now available for all modes of BinarizationModes.

Migrate to Template File

The following properties can only be set via a template file. Please contact us so that we can help you to transform your current settings to a new template file.

PublicRuntimeSettings Property Template File Parameter
binarizationModes ImageParameter.BinarizationModes
textResultOrderModes BarcodeReaderTaskSetting.TextResultOrderModes
returnBarcodeZoneClarity BarcodeReaderTaskSetting.ReturnBarcodeZoneClarity
scaleUpModes ImageParameter.ScaleUpModes
barcodeZoneMinDistanceToImageBorders BarcodeFormatSpecification.BarcodeZoneMinDistanceToImageBorders
terminatePhase BarcodeReaderTaskSetting.TerminateSettings
PublicRuntimeSettings.furtherModes Property Template File Parameter
colourConversionModes ImageParameter.ColourConversionModes
regionPredetectionModes ImageParameter.RegionPredetectionModes
textureDetectionModes ImageParameter.TextureDetectionModes
textFilterModes ImageParameter.TextDetectionMode & ImageParameter.IfEraseTextZone
dpmCodeReadingModes BarcodeReaderTaskSetting.DPMCodeReadingModes
deformationResistingModes BarcodeReaderTaskSetting.DeformationResistingModes
barcodeComplementModes BarcodeReaderTaskSetting.BarcodeComplementModes
barcodeColourModes BarcodeReaderTaskSetting.BarcodeColourModes

Migrate to Other APIs

The Intermediate Result system is redesigned and the following properties are deprecated.

PublicRuntimeSettings Property
intermediateResultTypes
intermediateResultSavingMode

Removed

The following properties are removed.

PublicRuntimeSettings Property
resultCoordinateType
FurtherModes Property
colourClusteringModes

This page is compatible for:

Version 7.5.0

Is this page helpful?

YesYes NoNo

In this article:

latest version

  • Latest version
  • Version 9.x
    • Version 9.6.40
    • Version 9.6.20
    • Version 9.6.11
    • Version 9.6.10
    • Version 9.6.0
    • Version 9.4.0
    • Version 9.2.13
    • Version 9.2.11
    • Version 9.2.10
    • Version 9.0.2
    • Version 9.0.1
    • Version 9.0.0
  • Version 8.x
    • Version 8.9.3
    • Version 8.9.1
    • Version 8.9.0
    • Version 8.8.0
    • Version 8.6.0
    • Version 8.4.0
    • Version 8.2.1
    • Version 8.2.0
    • Version 8.1.2
    • Version 8.1.0
    • Version 8.0.0
  • Version 7.x
    • Version 7.6.0
    • Version 7.5.0
Change +