Table of contents

License Methods

Method Description
initLicense Initializes license key and activate the SDK.
getIdleInstancesCount Gets available instances count when charging by concurrent instances count.
initLicenseFromServer Deprecated
initLicenseFromLicenseContent Deprecated
outputLicenseToString Deprecated
initDLSConnectionParameters Deprecated
initLicenseFromDLS Deprecated
initLTSConnectionParameters Deprecated
initLicenseFromLTS Deprecated

initLicense

Initializes license key and activates the SDK.

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

Parameters

license The product keys.

Exception

BarcodeReaderException

Code Snippet

BarcodeReader.initLicense("YOUR-LICENSE-KEY");
BarcodeReader reader = new BarcodeReader();
// add further process

getIdleInstancesCount

Gets the count of available instances when charging by concurrent instances count.

static int com.dynamsoft.dbr.BarcodeReader.getIdleInstancesCount()

Return Value

Returns available instances count.

  • 0: There is no space for new instance
  • -1: The available count needs to be updated from server by calling initLicense.
  • N ( N > 0 ): N more instances can be created.

Code Snippet

//...
int count = BarcodeReader.getIdleInstancesCount();
if(count > 0)
{
  //create instance and process further
}
if(count < 0)
{
  //call InitLicense
  //create instance and process further
}
if(count = 0)
{
  //waiting for available instances 
}

initLicenseFromServer

Deprecated. It still works in this version but could be removed in the near future.

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

initLicenseFromLicenseContent

Deprecated. It still works in this version but could be removed in the near future.

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

outputLicenseToString

Deprecated. It still works in this version but could be removed in the near future.

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

initDLSConnectionParameters

Deprecated. It still works in this version but could be removed in the near future.

static DMDLSConnectionParameters com.dynamsoft.dbr.BarcodeReader.initDLSConnectionParameters() throws BarcodeReaderException

initLicenseFromDLS

Deprecated. It still works in this version but could be removed in the near future.

static void com.dynamsoft.dbr.BarcodeReader.initLicenseFromDLS(DMDLSConnectionParameters dlsInfo) throws BarcodeReaderException

initLTSConnectionParameters

Deprecated. It still works in this version but could be removed in the near future.

initLicenseFromLTS

Deprecated. It still works in this version but could be removed in the near future.

This page is compatible for:

Is this page helpful?

YesYes NoNo

In this article: