Capture Stages

To improve the client's UX, we recommend creating difficulty stages for the DocumentDetector. For this, we offer the CaptureStage object, where you can set the following parameters:

Parameter
Description

captureMode: CaptureMode

Document capture mode: CaptureMode.AUTOMATIC or CaptureMode.MANUAL. In manual mode, a capture button is enabled for the user.

durationMillis: Long?

Duration of the stage in milliseconds. Use null for no timeout.

wantSensorCheck: Boolean

Enables or disables sensor usage for photo capture.

Default value

Since the .setCaptureStages parameter is not required, if it is not used, the DocumentDetector will use this default:

listOf {
    CaptureStage(CaptureMode.AUTOMATIC, 30000L, true),
    CaptureStage(CaptureMode.AUTOMATIC, 15000L, false),
    CaptureStage(CaptureMode.MANUAL, null, false)
}

Last updated

Logo

2023 © Caf. - All rights reserved