Android API references
Primary Class - CameraEnhancer
Initialization
Method | Description |
---|---|
CameraEnhancer |
Initialize the CameraEnhancer object. |
initLicense |
Sets product key and activate the SDK. |
getVersion |
Get the SDK version. |
Basic Camera Control Methods
Method | Description |
---|---|
getAllCameras |
Get all available cameras. This method returns a list of available camera IDs. |
selectCamera |
Select and active a camera from the camera list with the camera ID. |
getSelectedCamera |
Get the camera ID of the current selected camera. |
getCameraState |
Get the state of the currently selected camera. |
open |
Turn on the current selected camera. |
close |
Turn off the current selected camera. |
pause |
Pause the current selected camera. |
resume |
Resume the current selected camera. |
turnOnTorch |
Turn on the torch. |
turnOffTorch |
Turn off the torch. |
setFrameRate |
Set the frame rate to the input value (if the input value is available for the device). |
getFrameRate |
Get the current frame rate. |
getResolutionList |
Get all available resolutions. |
setResolution |
Set the resolution to the input value (if the input value is available for the device). |
getResolution |
Get the current resolution. |
setZoom |
Set the zoom factor. Once setZoom is triggered and approved, the zoom factor of the actived camera will immediately become the input value. |
setFocus |
Set the focus position (value range from 0.0f to 1.0f) and trigger a focus at the configured position. |
setScanRegion |
Set the scan region with a RegionDefinition value. The frame will be cropped according to the scan region. |
getScanRegion |
Get the scan region. |
setScanRegionVisible |
Set whether to display the scanRegion on the UI. |
getScanRegionVisible |
Get whether the scanRegion will be displayed on the UI. |
Frame Acquiring Methods
Method | Description |
---|---|
getFrameFromBuffer |
Get the latest frame from the buffer. The input boolean value determines whether the fetched frame will be removed from the buffer. |
addListener |
Add a listener to the Camera Enhancer instance. |
removeListener |
Remove a preciously added listener from the Camera Enhancer instance. |
Enhanced Features
Method | Description |
---|---|
enableFeatures |
Enable DCE features with Enumeration value. |
disableFeatures |
Disable DCE features with Enumeration value. |
isFeatureEnabled |
Returns a boolean value that means whether the feature(s) you input is (are) enabled. |
Camera UI Methods
Method | Description |
---|---|
setCameraView |
Sets camera video streaming UI. Read more from DCECameraView . |
getCameraView |
Gets camera video streaming UI. Read more from DCECameraView . |
Advanced Camera Control Methods
Method | Description |
---|---|
updateAdvancedSettingsFromFile |
Update advanced parameter settings including filter, sensor and focus settings from a JSON file. |
updateAdvancedSettingsFromString |
Update advanced parameter settings including filter, sensor and focus settings from a JSON string. |