Documentation
Table of contents

Thanks for downloading Dynamsoft Label Recognizer Package!

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

Android API Reference - Initialization

You are viewing a history document page of Dynamsoft Label Recognizer Android v1.x.

Method Description
LabelRecognition Initialization of LabelRecognition object.
destroy Destroys an instance of LabelRecognition object.
initLicense Sets product key and activates the SDK.
initLicenseFromLTS Initializes the label recognition license and connects to the specified server for online verification.

LabelRecognition Initialization

Initialization of LabelRecognition object without a license.

com.dynamsoft.dlr.LabelRecognition.LabelRecognition() throws LabelRecognitionException

Initialization of LabelRecognition with a license.

com.dynamsoft.dlr.LabelRecognition.LabelRecognition(String license)	throws Exception

Exceptions

LabelRecognitionException

Remarks

If you initialize DynamsoftLabelRecognition without a license, the recognition results may be unreliable.

Code Snippet

LabelRecognition recognizer = new LabelRecognition();
LabelRecognition recognizer = new LabelRecognition("t0260NwAAAHV***************");

 

Destroy

void com.dynamsoft.dlr.LabelRecognition.destroy()	

Code Snippet

LabelRecognition recognizer = new LabelRecognition("t0260NwAAAHV***************");
recognizer.destroy();

initLicense

Sets product key and activate the SDK.

void com.dynamsoft.dlr.LabelRecognition.initLicense(String license) throws LabelRecognitionException

Parameters license: The product keys.

Exceptions

LabelRecognitionException

Code Snippet

LabelRecognition recognizer = new LabelRecognition();
recognizer.initLicense("t0260NwAAAHV***************");
recognizer.destroy();

 

initLicenseFromLTS

Initializes the label recognition license and connects to the specified server for online verification.

void com.dynamsoft.dlr.LabelRecognition.initLicenseFromLTS(DMLTSConnectionParameters ltsInfo, DLRLTSLicenseVerificationListener listener)

Parameters

  • ltsInfo: The struct DMLTSConnectionParameters with customized settings.
  • listener: The delegate to handle callback when license server returns.

Code Snippet

LabelRecognition recognizer = new LabelRecognition();
DMLTSConnectionParameters info = new DMLTSConnectionParameters();
info.handShakeCode = "*****-hs-****";
info.sessionPassword = "******";
recognizer.initLicenseFromLTS(info, new DLRLTSLicenseVerificationListener() {
   @Override
   public void LTSLicenseVerificationCallback(boolean b, Exception e) {
      if (!b && e != null) {
         e.printStackTrace();
      }
   }
}

 

This page is compatible for:

Version 7.5.0

Is this page helpful?

YesYes NoNo

In this article:

latest version

    • Latest version
    • Version 2.2.20
    • Version 2.0.0
    • Version 1.2.1
    • Version 1.2
    • Version 1.0
    Change +
    © 2003–2024 Dynamsoft. All rights reserved.
    Privacy Statement / Site Map / Home / Purchase / Support