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()
Which camera module to use on start-up. final Unit
setCameraModule(CameraModule cameraModule)
Which camera module to use on start-up. final List<Double>
getZoomSteps()
The number of zoom steps available to the user. final Unit
setZoomSteps(List<Double> zoomSteps)
The number of 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()
Whether the flash is enabled by default. final Unit
setFlashEnabled(Boolean flashEnabled)
Whether the flash is enabled by default. final Boolean
getMinFocusDistanceLock()
Whether to lock the focus on the minimum possible distance (device-specific). final Unit
setMinFocusDistanceLock(Boolean minFocusDistanceLock)
Whether to lock the focus on the minimum possible distance (device-specific). final Boolean
getTouchToFocusEnabled()
Whether touch-to-focus is enabled. final Unit
setTouchToFocusEnabled(Boolean touchToFocusEnabled)
Whether touch-to-focus is enabled. final Boolean
getPinchToZoomEnabled()
Whether pinch-to-zoom is enabled. final Unit
setPinchToZoomEnabled(Boolean pinchToZoomEnabled)
Whether pinch-to-zoom is enabled. final OrientationLockMode
getOrientationLockMode()
Which mode to use when orientation should be locked to landscape or portrait. final Unit
setOrientationLockMode(OrientationLockMode orientationLockMode)
Which mode to use when orientation should be locked to landscape or portrait. final CameraPreviewMode
getCameraPreviewMode()
Which camera preview mode to use. final Unit
setCameraPreviewMode(CameraPreviewMode cameraPreviewMode)
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()
Which camera module to use on start-up. Default is BACK
-
setCameraModule
final Unit setCameraModule(CameraModule cameraModule)
Which camera module to use on start-up. Default is BACK
-
getZoomSteps
final List<Double> getZoomSteps()
The number of zoom steps available to the user.
-
setZoomSteps
final Unit setZoomSteps(List<Double> zoomSteps)
The number of 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()
Whether the flash is enabled by default. Default is false
-
setFlashEnabled
final Unit setFlashEnabled(Boolean flashEnabled)
Whether the flash is enabled by default. Default is false
-
getMinFocusDistanceLock
final Boolean getMinFocusDistanceLock()
Whether to lock the focus on the minimum possible distance (device-specific). Default is false
-
setMinFocusDistanceLock
final Unit setMinFocusDistanceLock(Boolean minFocusDistanceLock)
Whether to lock the focus on the minimum possible distance (device-specific). Default is false
-
getTouchToFocusEnabled
final Boolean getTouchToFocusEnabled()
Whether touch-to-focus is enabled. Android only. Default is false
-
setTouchToFocusEnabled
final Unit setTouchToFocusEnabled(Boolean touchToFocusEnabled)
Whether touch-to-focus is enabled. Android only. Default is false
-
getPinchToZoomEnabled
final Boolean getPinchToZoomEnabled()
Whether pinch-to-zoom is enabled. Default is true
-
setPinchToZoomEnabled
final Unit setPinchToZoomEnabled(Boolean pinchToZoomEnabled)
Whether pinch-to-zoom is enabled. Default is true
-
getOrientationLockMode
final OrientationLockMode getOrientationLockMode()
Which mode to use when orientation should be locked to landscape or portrait. Default is NONE
-
setOrientationLockMode
final Unit setOrientationLockMode(OrientationLockMode orientationLockMode)
Which mode to use when orientation should be locked to landscape or portrait. Default is NONE
-
getCameraPreviewMode
final CameraPreviewMode getCameraPreviewMode()
Which camera preview mode to use. Default is FILL_IN
-
setCameraPreviewMode
final Unit setCameraPreviewMode(CameraPreviewMode cameraPreviewMode)
Which camera preview mode to use. Default is FILL_IN
-
toJson
final JSONObject toJson()
-
default
final static CameraConfiguration default()
-
-
-
-