Class DocumentScannerCameraConfiguration
-
- All Implemented Interfaces:
-
android.os.Parcelable
public final class DocumentScannerCameraConfiguration implements Parcelable
Configuration of the camera behavior.
-
-
Field Summary
Fields Modifier and Type Field Description private CameraModulecameraModuleprivate DoubledefaultZoomFactorprivate BooleanautoCropOnManualSnapprivate BooleanflashEnabledprivate BooleanminFocusDistanceLockprivate BooleantouchToFocusEnabledprivate BooleanpinchToZoomEnabledprivate CameraPreviewModecameraPreviewModeprivate CapturePhotoQualityPrioritizationcaptureQualityPrioritizationprivate DoubleautoSnappingSensitivityprivate IntegerautoSnappingDelayprivate BooleanautoSnappingEnabledprivate BooleancaptureWithHardwareButtonsEnabled
-
Constructor Summary
Constructors Constructor Description DocumentScannerCameraConfiguration(Map<String, Object> source)DocumentScannerCameraConfiguration(JSONObject json)DocumentScannerCameraConfiguration(CameraModule cameraModule, Double defaultZoomFactor, Boolean autoCropOnManualSnap, Boolean flashEnabled, Boolean minFocusDistanceLock, Boolean touchToFocusEnabled, Boolean pinchToZoomEnabled, CameraPreviewMode cameraPreviewMode, CapturePhotoQualityPrioritization captureQualityPrioritization, Double autoSnappingSensitivity, Integer autoSnappingDelay, Boolean autoSnappingEnabled, Boolean captureWithHardwareButtonsEnabled)
-
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 DoublegetDefaultZoomFactor()The default zoom factor on start-up. final UnitsetDefaultZoomFactor(Double defaultZoomFactor)The default zoom factor on start-up. final BooleangetAutoCropOnManualSnap()Determines whether the document should be cropped automatically after a manual snap or not. final UnitsetAutoCropOnManualSnap(Boolean autoCropOnManualSnap)Determines whether the document should be cropped automatically after a manual snap or not. final BooleangetFlashEnabled()Determines whether the flashlight is enabled or not on start-up. final UnitsetFlashEnabled(Boolean flashEnabled)Determines whether the flashlight is enabled or not on start-up. final BooleangetMinFocusDistanceLock()Determines whether locking the focus at the minimum possible distance is enabled or not (device-specific). final UnitsetMinFocusDistanceLock(Boolean minFocusDistanceLock)Determines whether locking the focus at the minimum possible distance is enabled or not (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 CameraPreviewModegetCameraPreviewMode()Determines which camera preview mode to use. final UnitsetCameraPreviewMode(CameraPreviewMode cameraPreviewMode)Determines which camera preview mode to use. final CapturePhotoQualityPrioritizationgetCaptureQualityPrioritization()Determines the prioritization of still image quality and capturing speed. final UnitsetCaptureQualityPrioritization(CapturePhotoQualityPrioritization captureQualityPrioritization)Determines the prioritization of still image quality and capturing speed. final DoublegetAutoSnappingSensitivity()Controls the auto snapping speed. final UnitsetAutoSnappingSensitivity(Double autoSnappingSensitivity)Controls the auto snapping speed. final IntegergetAutoSnappingDelay()After a page has been snapped, the delay in milliseconds before auto snapping resumes for the next page. final UnitsetAutoSnappingDelay(Integer autoSnappingDelay)After a page has been snapped, the delay in milliseconds before auto snapping resumes for the next page. final BooleangetAutoSnappingEnabled()Determines if auto snapping is enabled or not. final UnitsetAutoSnappingEnabled(Boolean autoSnappingEnabled)Determines if auto snapping is enabled or not. final BooleangetCaptureWithHardwareButtonsEnabled()When enabled the hardware volume up/down buttons can be used to capture an image if manual snapping is enabled. final UnitsetCaptureWithHardwareButtonsEnabled(Boolean captureWithHardwareButtonsEnabled)When enabled the hardware volume up/down buttons can be used to capture an image if manual snapping is enabled. final JSONObjecttoJson(ToJsonConfiguration config)final DocumentScannerCameraConfigurationclone()final static DocumentScannerCameraConfigurationdefault()-
-
Constructor Detail
-
DocumentScannerCameraConfiguration
DocumentScannerCameraConfiguration(JSONObject json)
-
DocumentScannerCameraConfiguration
DocumentScannerCameraConfiguration(CameraModule cameraModule, Double defaultZoomFactor, Boolean autoCropOnManualSnap, Boolean flashEnabled, Boolean minFocusDistanceLock, Boolean touchToFocusEnabled, Boolean pinchToZoomEnabled, CameraPreviewMode cameraPreviewMode, CapturePhotoQualityPrioritization captureQualityPrioritization, Double autoSnappingSensitivity, Integer autoSnappingDelay, Boolean autoSnappingEnabled, Boolean captureWithHardwareButtonsEnabled)
-
-
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
-
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
-
getAutoCropOnManualSnap
final Boolean getAutoCropOnManualSnap()
Determines whether the document should be cropped automatically after a manual snap or not.
Default is true
-
setAutoCropOnManualSnap
final Unit setAutoCropOnManualSnap(Boolean autoCropOnManualSnap)
Determines whether the document should be cropped automatically after a manual snap or not.
Default is true
-
getFlashEnabled
final Boolean getFlashEnabled()
Determines whether the flashlight is enabled or not on start-up.
Default is false
-
setFlashEnabled
final Unit setFlashEnabled(Boolean flashEnabled)
Determines whether the flashlight is enabled or not on start-up.
Default is false
-
getMinFocusDistanceLock
final Boolean getMinFocusDistanceLock()
Determines whether locking the focus at the minimum possible distance is enabled or not (device-specific).
Default is false
-
setMinFocusDistanceLock
final Unit setMinFocusDistanceLock(Boolean minFocusDistanceLock)
Determines whether locking the focus at the minimum possible distance is enabled or not (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
-
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
-
getCaptureQualityPrioritization
final CapturePhotoQualityPrioritization getCaptureQualityPrioritization()
Determines the prioritization of still image quality and capturing speed.
Default is BALANCED
-
setCaptureQualityPrioritization
final Unit setCaptureQualityPrioritization(CapturePhotoQualityPrioritization captureQualityPrioritization)
Determines the prioritization of still image quality and capturing speed.
Default is BALANCED
-
getAutoSnappingSensitivity
final Double getAutoSnappingSensitivity()
Controls the auto snapping speed. The sensitivity must be between 0.0 and 1.0. A value of 1.0 triggers auto snapping immediately, while a value of 0.0 delays the auto snapping by 3 seconds. The default value is 0.66 (2 seconds).
Default is 0.66
-
setAutoSnappingSensitivity
final Unit setAutoSnappingSensitivity(Double autoSnappingSensitivity)
Controls the auto snapping speed. The sensitivity must be between 0.0 and 1.0. A value of 1.0 triggers auto snapping immediately, while a value of 0.0 delays the auto snapping by 3 seconds. The default value is 0.66 (2 seconds).
Default is 0.66
-
getAutoSnappingDelay
final Integer getAutoSnappingDelay()
After a page has been snapped, the delay in milliseconds before auto snapping resumes for the next page.
Default is 200
-
setAutoSnappingDelay
final Unit setAutoSnappingDelay(Integer autoSnappingDelay)
After a page has been snapped, the delay in milliseconds before auto snapping resumes for the next page.
Default is 200
-
getAutoSnappingEnabled
final Boolean getAutoSnappingEnabled()
Determines if auto snapping is enabled or not.
Default is true
-
setAutoSnappingEnabled
final Unit setAutoSnappingEnabled(Boolean autoSnappingEnabled)
Determines if auto snapping is enabled or not.
Default is true
-
getCaptureWithHardwareButtonsEnabled
final Boolean getCaptureWithHardwareButtonsEnabled()
When enabled the hardware volume up/down buttons can be used to capture an image if manual snapping is enabled. For iOS version 17.2 or later is required. On iPhones with camera control (iPhone 16 series) this also enables zooming and capturing with the camera control.
Default is true
-
setCaptureWithHardwareButtonsEnabled
final Unit setCaptureWithHardwareButtonsEnabled(Boolean captureWithHardwareButtonsEnabled)
When enabled the hardware volume up/down buttons can be used to capture an image if manual snapping is enabled. For iOS version 17.2 or later is required. On iPhones with camera control (iPhone 16 series) this also enables zooming and capturing with the camera control.
Default is true
-
toJson
final JSONObject toJson(ToJsonConfiguration config)
-
clone
final DocumentScannerCameraConfiguration clone()
-
default
final static DocumentScannerCameraConfiguration default()
-
-
-
-