For the complete documentation index, see llms.txt. This page is also available as Markdown.

Capturing Videos

OzCapsula (SDK v8.22 and newer)

To start recording, use startActivityForResult:

Kotlin
val sessionToken: String = getSessionToken()
val captureRequest = CaptureRequest(
    listOf(
        AnalysisProfile(
            Analysis.Type.QUALITY,
            listOf(MediaRequest.ActionMedia(OzAction.Blank)),
        )
    )
)
val intent = OzLivenessSDK.createMediaCaptureScreen(captureRequest, sessionToken)
startActivityForResult(intent, REQUEST_LIVENESS_CONTAINER)
For multi-gesture scenarios

To obtain the container, use onActivityResult:

If you use fragment, please refer to the example below. LivenessFragment is the Fragment representation of the Liveness screen UI.

SDK 8.21 and older

To start recording, use thestartActivityForResult method:

actions – a list of user actions while recording video.

For Fragment, use the code below. LivenessFragment is the Fragment representation of the Liveness screen UI.

To obtain the captured video, use theonActivityResult method:

  • sdkMediaResult – an object with video capturing results for interactions with Oz API (a list of the OzAbstractMedia objects),

  • sdkErrorString – description of errors, if any.

If you use our SDK just for capturing videos, omit the Checking Liveness and Face Biometry step.

If a user closes the capturing screen manually, resultCode receives the Activity.RESULT_CANCELED value.

Code example:

Last updated

Was this helpful?