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
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
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();
}
}
}