FaceMatcherSession

abstract class FaceMatcherSession(val referencePortrait: ByteString)

Session driving the interactive face matching verification UI against a reference portrait.

A fresh session instance is created per verification attempt via FaceMatcher.createSession. It directly controls the messages above and below the camera preview, the overlay, and verification status.

Constructors

Link copied to clipboard
constructor(referencePortrait: ByteString)

Properties

Link copied to clipboard
protected val _state: MutableStateFlow<FaceMatcherPromptState>
Link copied to clipboard
val referencePortrait: ByteString

reference portrait image bytes in PNG, JPEG, or JPEG 2000 format to verify against.

Link copied to clipboard

Observable reactive state stream consumed by UI dialogs.

Functions

Link copied to clipboard
open fun cancel()

Cancels the verification session and releases any associated resources.

Link copied to clipboard
open suspend fun feedFrame(frame: CameraFrame)

Feeds a camera frame captured from the front camera into the matcher session.

Link copied to clipboard
open fun onTouchEvent(x: Float, y: Float)

Pushes a touch or tap event within the camera preview into the session.

Link copied to clipboard
protected fun updateState(message: String? = _state.value.message, status: FaceMatcherPromptState.Status = _state.value.status, overlay: OverlayFrame? = _state.value.overlay, backgroundColor: Color? = _state.value.backgroundColor)

Atomically updates the prompt UI state.