Dev Center
Table of contents

Java API Reference - BarcodeReader License Methods

Method Description
initLicense Reads product key and activate the SDK.
initLicenseFromServer Initializes license and connect to the specified server for online verification.
initLicenseFromLicenseContent Initializes license from the license content on client machine for offline verification.
outputLicenseToString Outputs the license content to a string from the license server.
initLTSConnectionParameters Initializes a DMLTSConnectionParameters struct with default values.
initLicenseFromLTS Initializes the barcode reader license and connects to the specified server for online verification.

initLicense

Read product key and activate the SDK.

void com.dynamsoft.dbr.BarcodeReader.initLicense(String license) throws BarcodeReaderException

Parameters

license The product keys.

Exceptions

BarcodeReaderException

Code Snippet

BarcodeReader reader = new BarcodeReader();
reader.initLicense("t0260NwAAAHV***************");
reader.destroy();

initLicenseFromServer

Initialize the license and connect to the specified server for online verification.

void com.dynamsoft.dbr.BarcodeReader.initLicenseFromServer(String licenseServer, String licenseKey)	throws BarcodeReaderException

Parameters

licenseServer The URL of the license server.
licenseKey The license key.

Exceptions

BarcodeReaderException

Code Snippet

BarcodeReader reader = new BarcodeReader("t0260NwAAAHV***************");
reader.initLicenseFromServer("", "C087****");
reader.destroy();

initLicenseFromLicenseContent

Initialize barcode reader license from the license content on the client machine for offline verification.

void com.dynamsoft.dbr.BarcodeReader.initLicenseFromLicenseContent(String licenseKey, String licenseContent) throws BarcodeReaderException

Parameters

licenseKey The license key.
licenseContent An encrypted string representing the license content (quota, expiration date, barcode type, etc.) obtained from the method OutputLicenseToString.

Exceptions

BarcodeReaderException

Code Snippet

BarcodeReader reader = new BarcodeReader("t0260NwAAAHV***************");
reader.initLicenseFromLicenseContent("t0260NwAAAHV***************", "C087****");
reader.destroy();

outputLicenseToString

Output the license content as an encrypted string from the license server to be used for offline license verification.

String com.dynamsoft.dbr.BarcodeReader.outputLicenseToString() throws BarcodeReaderException

Return value

The output string which stores the contents of license.

Exceptions

BarcodeReaderException

Remark

InitLicenseFromServer has to be successfully called before calling this method.

Code Snippet

BarcodeReader reader = new BarcodeReader("t0260NwAAAHV***************");
reader.initLicenseFromLicenseContent("t0260NwAAAHV***************", "C087****");
String licenseInfo = reader.outputLicenseToString();
reader.destroy();

initLTSConnectionParameters

Initializes a DMLTSConnectionParameters struct with default values.

DMLTSConnectionParameters com.dynamsoft.dbr.BarcodeReader.initLTSConnectionParameters() throws BarcodeReaderException

Code Snippet

BarcodeReader reader = new BarcodeReader();
DMLTSConnectionParameters info = reader.initLTSConnectionParameters();
info.handShakeCode = "*****-hs-****";
info.sessionPassword = "******";
reader.initLicenseFromLTS(info);

initLicenseFromLTS

Initializes the barcode reader license and connects to the specified server for online verification.

void com.dynamsoft.dbr.BarcodeReader.initLicenseFromLTS(DMLTSConnectionParameters ltsInfo) throws BarcodeReaderException

Parameters

  • ltsInfo: The struct DMLTSConnectionParameters with customized settings.

Code Snippet

BarcodeReader reader = new BarcodeReader();
DMLTSConnectionParameters info = reader.initLTSConnectionParameters();
info.handShakeCode = "*****-hs-****";
info.sessionPassword = "******";
reader.initLicenseFromLTS(info);

This page is compatible for:

Is this page helpful?

YesYes NoNo

In this article:

version 8.2.0

  • Latest version
  • Version 10.x
    • Version 10.4.2000
    • Version 10.4.10
    • Version 10.2.10
    • Version 10.2.0
    • Version 10.0.20
    • Version 10.0.10
    • Version 10.0.0
  • Version 9.x
    • Version 9.6.40
    • Version 9.6.30
    • Version 9.6.20
    • Version 9.6.10
    • Version 9.6.0
    • Version 9.4.0
    • Version 9.2.0
    • Version 9.0.0
  • Version 8.x
    • Version 8.8.0
    • Version 8.6.0
    • Version 8.4.0
    • 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
  • Documentation Homepage
Change +