Resource Base
Table of contents

Interface

com.dynamsoft.dce.CameraListener

From CameraListener user can get preprocessed frames.

  • onPreviewOriginalFrame: Get the original frame.
  • onPreviewFilterFrame: Get the filtered frame.
  • onPreviewFastFrame: Get the filtered and cropped frame.

Java:

mCameraEnhancer.addCameraListener(new CameraListener() {
    @Override
    public void onPreviewOriginalFrame(Frame frame) {}
    @Override
    public void onPreviewFilterFrame(Frame frame) {}
    @Override
    public void onPreviewFastFrame(Frame frame) {}
});

Kotlin:

mCameraEnhancer!!.addCameraListener(object : CameraListener {
    override fun onPreviewOriginalFrame(frame: Frame) {}
    override fun onPreviewFilterFrame(frame: Frame) {}
    override fun onPreviewFastFrame(frame: Frame) {}
})

com.dynamsoft.dce.CameraLTSLicenseVerificationListener

This is the method that handles callback when license tracking server returns.

  • isSuccess: Whether the license verification was successful.
  • error: The error message from license server.

Java:

com.dynamsoft.dce.DMLTSConnectionParameters info = new com.dynamsoft.dce.DMLTSConnectionParameters();
info.organizationID = "Put your organizationID here.";
mCameraEnhancer.initLicenseFromLTS(info,new CameraLTSLicenseVerificationListener() {
    @Override
    public void LTSLicenseVerificationCallback(boolean isSuccess, Exception error) {
        if(!isSuccess){ error.printStackTrace(); }
    }
});

Kotlin:

val info = com.dynamsoft.dce.DMLTSConnectionParameters()
info.organizationID = "Put your organizationID here."
mCameraEnhancer!!.initLicenseFromLTS(info) { isSuccess, error ->
    if (!isSuccess) {
        error.printStackTrace()
    }
}

com.dynamsoft.dce.TorchListener

This is the method that handles the torch state when the torch state changes.

Java:

mCameraEnhancer.addTorchListener(new TorchListener() {
    @Override
    public void onTorchStateChanged(TorchState torchState) {
                
    }
});

Kotlin:

mCameraEnhancer!!.addTorchListener(object : TorchListener {
    override fun onTorchStateChanged(TorchState: torchState) {}
})

This page is compatible for:

Version 1.0

Is this page helpful?

YesYes NoNo

In this article:

version 1.0.1

  • Latest version
  • Version 1.0.1
  • Version 1.0
Change +
© 2003–2021 Dynamsoft. All rights reserved.
Privacy Statement / Site Map / Home / Purchase / Support