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 CameraModulecameraModuleprivate List<Double>zoomStepsprivate DoubledefaultZoomFactorprivate BooleanflashEnabledprivate BooleanminFocusDistanceLockprivate BooleantouchToFocusEnabledprivate BooleanpinchToZoomEnabledprivate OrientationLockModeorientationLockModeprivate CameraPreviewModecameraPreviewMode
-
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 CameraModulegetCameraModule()Determines which camera module to use on start-up. final UnitsetCameraModule(CameraModule cameraModule)Determines which camera module to use on start-up. final List<Double>getZoomSteps()The zoom steps available to the user. final UnitsetZoomSteps(List<Double> zoomSteps)The zoom steps available to the user. final DoublegetDefaultZoomFactor()The default zoom factor on start-up. final UnitsetDefaultZoomFactor(Double defaultZoomFactor)The default zoom factor on start-up. final BooleangetFlashEnabled()Determines whether the flash is enabled on start-up. final UnitsetFlashEnabled(Boolean flashEnabled)Determines whether the flash is enabled on start-up. final BooleangetMinFocusDistanceLock()Determines whether to lock the focus at the minimum possible distance (device-specific). final UnitsetMinFocusDistanceLock(Boolean minFocusDistanceLock)Determines whether to lock the focus at the minimum possible distance (device-specific). final BooleangetTouchToFocusEnabled()Determines whether touch-to-focus is enabled or not. final UnitsetTouchToFocusEnabled(Boolean touchToFocusEnabled)Determines whether touch-to-focus is enabled or not. final BooleangetPinchToZoomEnabled()Determines whether pinch-to-zoom is enabled or not. final UnitsetPinchToZoomEnabled(Boolean pinchToZoomEnabled)Determines whether pinch-to-zoom is enabled or not. final OrientationLockModegetOrientationLockMode()Determines which mode to use when orientation should be locked to landscape or portrait. final UnitsetOrientationLockMode(OrientationLockMode orientationLockMode)Determines which mode to use when orientation should be locked to landscape or portrait. final CameraPreviewModegetCameraPreviewMode()Determines which camera preview mode to use. final UnitsetCameraPreviewMode(CameraPreviewMode cameraPreviewMode)Determines which camera preview mode to use. final JSONObjecttoJson(ToJsonConfiguration config)final CameraConfigurationclone()final static CameraConfigurationdefault()-
-
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(ToJsonConfiguration config)
-
clone
final CameraConfiguration clone()
-
default
final static CameraConfiguration default()
-
-
-
-