Skip to content

Preview View

From version 8 onwards, the preview management changed in the SDK to make it easier to integrate.

To improve flexibility in the preview screen, the optional preview screen has been removed.

To add a preview feature to your app you can follow the example from our sample app, where we provide an example with the same user interface.

Example can be found here: FaceCapturePreview

private fun onSuccess(faceCaptureSuccess: FaceCaptureReportSuccess) {
    val photo = readPhotoFromInternalStorage(context, faceCaptureSuccess.faceCaptureReport.faceCaptureImagePath)
    binding.imgFaceCapturePhoto.run {
        setBackgroundResource(R.drawable.bg_face_capture_preview_image)
        setImageBitmap(photo)
    }
}

Build the preview from the report returned by biometricFaceCapture:

private func showPreview(for report: BiometricFaceCaptureReport) {
    previewImageView.image = report.photo
}