Skip to content

Latest commit

 

History

History
63 lines (50 loc) · 1.98 KB

File metadata and controls

63 lines (50 loc) · 1.98 KB
layout ignore title description keywords needAutoGenerateSidebar noTitleIndex needGenerateH3Content breadcrumbText permalink
default-layout
true
Initialization Methods - Dynamsoft Camera Enhancer Android API references
This is the documentation - Android API references - Initialization Methods page of Dynamsoft Camera Enhancer.
Camera Enhancer, Android API references, Initialization Methods
true
true
true
Android Initialization Methods
/programming/android/primary-api/initialization.html

Initialization Methods

You are viewing a history document page of DCE v1.0.3.

Method Description
initLicenseFromDLS Initialize the Camera Enhancer from the license server with a license.

initLicenseFromDLS

Initialize the CameraEnhancer from the license server.

void initLicenseFromDLS(CameraDLSLicenseVerificationListener listener)

Parameters

CameraDLSLicenseVerificationListener: The interface [CameraDLSLicenseVerificationListener]({{ site.android-api-auxiliary }}interface-licenselistener-v1.0.3.html).

Code Snippet

Java:

CameraEnhancer mCameraEnhancer = new CameraEnhancer(MainActivity.this);
mCameraEnhancer.addCameraView(cameraView);
com.dynamsoft.dce.DMDLSConnectionParameters info = new com.dynamsoft.dce.DMDLSConnectionParameters();
info.organizationID = "Put your organizationID here.";
mCameraEnhancer.initLicenseFromDLS(info,new CameraDLSLicenseVerificationListener() {
    @Override
    public void DLSLicenseVerificationCallback(boolean isSuccess, Exception error) {
        if(!isSuccess){ error.printStackTrace(); }
    }
});

Kotlin:

mCameraEnhancer = CameraEnhancer(this@MainActivity)
mCameraEnhancer!!.addCameraView(cameraView)
val info = com.dynamsoft.dce.DMDLSConnectionParameters()
info.organizationID = "Put your organizationID here."
mCameraEnhancer!!.initLicenseFromDLS(info) { isSuccess, error ->
    if (!isSuccess) {
        error.printStackTrace()
    }
}