DocumentAutoCaptureFragment

Document Auto Capture UI component.

A visual component for capturing good quality images suitable for optical character recognition.

Constructors

Types

Link copied to clipboard
object Companion
Link copied to clipboard
data class Configuration @JvmOverloads constructor(val cameraFacing: CameraFacing = CameraFacing.BACK, val cameraPreviewScaleType: CameraPreviewScaleType = CameraPreviewScaleType.FIT, val torchEnabled: Boolean = false, val validationMode: ValidationMode = ValidationMode.STANDARD, val qualityAttributeThresholds: QualityAttributeThresholds = QualityAttributeThresholdPresets.standard, val isDetectionLayerVisible: Boolean = false, val mrzValidation: MrzValidation = MrzValidation.NONE, val sessionToken: String? = null, val placeholderType: PlaceholderType = PlaceholderType.CORNERS_ONLY)

Configuration for the Document Auto Capture UI component.

Functions

Link copied to clipboard

Called only once for the whole process, when candidate selection has been started.

Link copied to clipboard

Called only once for the whole process, when the final document image candidate has been chosen. Once this callback is called, the whole process is considered to be over.

Link copied to clipboard
abstract fun onProcessed(detection: DocumentAutoCaptureDetection)

Called when a camera image is processed.

Link copied to clipboard

Subclasses should override this method to provide Configuration for the Document Auto Capture UI component.

Link copied to clipboard

Request capture event asynchronously (regardless of whether there is a document detected or not).

Link copied to clipboard
fun start()

Start the process.

Link copied to clipboard
fun stopAsync(onStopped: () -> Unit)

Stop the process asynchronously.