Web Demos

BARCODE READER SDK DEMO

Explore the flexibe barcode reading settings to optimize for your specific usage scenario.

WEB TWAIN SDK DEMO

Try the most popular web scanner features: scan images, import local images and PDF files, edit, save to local, upload to database, and etc.

BARCODE READER JAVASCRIPT DEMO

Transform any camera-equipped devices into real-time, browser-based barcode and QR code scanners.

MRZ SCANNER WEB DEMO

Detects the machine-readable zone of a passport, scans the text, and parses into human-readable data.

APP STORE DEMOS

BARCODE READER SDK FOR IOS

BARCODE READER SDK FOR ANDROID

VIEW MORE DEMOS >
Resource Base
Table of contents

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(EnumCameraPosition) Select whether to use front-facing camera or back-facing camera.
getCameraPosition Returns whether the front-facing camera or back-facing camera is selected.
selectCamera(String) Select a camera from the camera list with the camera ID.
getSelectedCamera Get the camera ID of the current selected camera.
getCameraPosition Returns whether the device uses a front-facing or rear-facing 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.

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.
takePhoto Take a photo from the camera and save the image in the memory.

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.

Advanced Camera Control Methods

Method Description
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.
getMaxZoomFactor Get the maximum available zoom factor.
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.
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.
setFrameRate Deprecated. Set the frame rate to the input value (if the input value is available for the device).

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.

Auxiliary Classes

Interfaces

Enumerations

This page is compatible for:

Version 1.0

Is this page helpful?

YesYes NoNo

In this article:

latest version

  • Latest version
  • Version 2.3.2
  • Version 2.3.1
  • Version 2.1.0
  • Version 2.0.0
  • Version 1.0.3
  • Version 1.0.1
  • Version 1.0.0
Change +
© 2003–2022 Dynamsoft. All rights reserved.
Privacy Statement / Site Map / Home / Purchase / Support