Class CameraConfiguration
-
- All Implemented Interfaces:
-
android.os.Parcelable
public final class CameraConfiguration implements Parcelable
Configuration of the camera settings to be used while scanning.
-
-
Field Summary
Fields Modifier and Type Field Description private CameraModule
cameraModule
private List<Double>
zoomSteps
private Double
defaultZoomFactor
private Boolean
flashEnabled
private Boolean
minFocusDistanceLock
private Boolean
touchToFocusEnabled
private Boolean
pinchToZoomEnabled
private OrientationLockMode
orientationLockMode
private CameraPreviewMode
cameraPreviewMode
-
Constructor Summary
Constructors Constructor Description CameraConfiguration(Map<String, Object> source)
CameraConfiguration(JSONObject json)
CameraConfiguration(CameraModule cameraModule, List<Double> zoomSteps, Double defaultZoomFactor, Boolean flashEnabled, Boolean minFocusDistanceLock, Boolean touchToFocusEnabled, Boolean pinchToZoomEnabled, OrientationLockMode orientationLockMode, CameraPreviewMode cameraPreviewMode)
-
Method Summary
Modifier and Type Method Description final CameraModule
getCameraModule()
Determines which camera module to use on start-up. final Unit
setCameraModule(CameraModule cameraModule)
Determines which camera module to use on start-up. final List<Double>
getZoomSteps()
The zoom steps available to the user. final Unit
setZoomSteps(List<Double> zoomSteps)
The zoom steps available to the user. final Double
getDefaultZoomFactor()
The default zoom factor on start-up. final Unit
setDefaultZoomFactor(Double defaultZoomFactor)
The default zoom factor on start-up. final Boolean
getFlashEnabled()
Determines whether the flash is enabled on start-up. final Unit
setFlashEnabled(Boolean flashEnabled)
Determines whether the flash is enabled on start-up. final Boolean
getMinFocusDistanceLock()
Determines whether to lock the focus at the minimum possible distance (device-specific). final Unit
setMinFocusDistanceLock(Boolean minFocusDistanceLock)
Determines whether to lock the focus at the minimum possible distance (device-specific). final Boolean
getTouchToFocusEnabled()
Determines whether touch-to-focus is enabled or not. final Unit
setTouchToFocusEnabled(Boolean touchToFocusEnabled)
Determines whether touch-to-focus is enabled or not. final Boolean
getPinchToZoomEnabled()
Determines whether pinch-to-zoom is enabled or not. final Unit
setPinchToZoomEnabled(Boolean pinchToZoomEnabled)
Determines whether pinch-to-zoom is enabled or not. final OrientationLockMode
getOrientationLockMode()
Determines which mode to use when orientation should be locked to landscape or portrait. final Unit
setOrientationLockMode(OrientationLockMode orientationLockMode)
Determines which mode to use when orientation should be locked to landscape or portrait. final CameraPreviewMode
getCameraPreviewMode()
Determines which camera preview mode to use. final Unit
setCameraPreviewMode(CameraPreviewMode cameraPreviewMode)
Determines which camera preview mode to use. final JSONObject
toJson()
final static CameraConfiguration
default()
-
-
Constructor Detail
-
CameraConfiguration
CameraConfiguration(JSONObject json)
-
CameraConfiguration
CameraConfiguration(CameraModule cameraModule, List<Double> zoomSteps, Double defaultZoomFactor, Boolean flashEnabled, Boolean minFocusDistanceLock, Boolean touchToFocusEnabled, Boolean pinchToZoomEnabled, OrientationLockMode orientationLockMode, CameraPreviewMode cameraPreviewMode)
-
-
Method Detail
-
getCameraModule
final CameraModule getCameraModule()
Determines which camera module to use on start-up. Default is BACK
-
setCameraModule
final Unit setCameraModule(CameraModule cameraModule)
Determines which camera module to use on start-up. Default is BACK
-
getZoomSteps
final List<Double> getZoomSteps()
The zoom steps available to the user.
-
setZoomSteps
final Unit setZoomSteps(List<Double> zoomSteps)
The zoom steps available to the user.
-
getDefaultZoomFactor
final Double getDefaultZoomFactor()
The default zoom factor on start-up. Default is 1.0
-
setDefaultZoomFactor
final Unit setDefaultZoomFactor(Double defaultZoomFactor)
The default zoom factor on start-up. Default is 1.0
-
getFlashEnabled
final Boolean getFlashEnabled()
Determines whether the flash is enabled on start-up. Default is false
-
setFlashEnabled
final Unit setFlashEnabled(Boolean flashEnabled)
Determines whether the flash is enabled on start-up. Default is false
-
getMinFocusDistanceLock
final Boolean getMinFocusDistanceLock()
Determines whether to lock the focus at the minimum possible distance (device-specific). Default is false
-
setMinFocusDistanceLock
final Unit setMinFocusDistanceLock(Boolean minFocusDistanceLock)
Determines whether to lock the focus at the minimum possible distance (device-specific). Default is false
-
getTouchToFocusEnabled
final Boolean getTouchToFocusEnabled()
Determines whether touch-to-focus is enabled or not. Android only. Default is false
-
setTouchToFocusEnabled
final Unit setTouchToFocusEnabled(Boolean touchToFocusEnabled)
Determines whether touch-to-focus is enabled or not. Android only. Default is false
-
getPinchToZoomEnabled
final Boolean getPinchToZoomEnabled()
Determines whether pinch-to-zoom is enabled or not. Default is true
-
setPinchToZoomEnabled
final Unit setPinchToZoomEnabled(Boolean pinchToZoomEnabled)
Determines whether pinch-to-zoom is enabled or not. Default is true
-
getOrientationLockMode
final OrientationLockMode getOrientationLockMode()
Determines which mode to use when orientation should be locked to landscape or portrait. Default is NONE
-
setOrientationLockMode
final Unit setOrientationLockMode(OrientationLockMode orientationLockMode)
Determines which mode to use when orientation should be locked to landscape or portrait. Default is NONE
-
getCameraPreviewMode
final CameraPreviewMode getCameraPreviewMode()
Determines which camera preview mode to use. Default is FILL_IN
-
setCameraPreviewMode
final Unit setCameraPreviewMode(CameraPreviewMode cameraPreviewMode)
Determines which camera preview mode to use. Default is FILL_IN
-
toJson
final JSONObject toJson()
-
default
final static CameraConfiguration default()
-
-
-
-