Resource Base
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) {}
})
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()
}
}
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) {}
})
version 1.0.1