Skip to main content

Feedback and localization

The predefined UI can show geometry, pose, and V3 lighting guidance without enabling debug mode.

Show feedback in production​

val style = MBUIOptions.Builder()
.progressBar(true)
.faceStatusLabel(true)
.countdownTimerLabel(true)
.build()

val options = MBCaptureSessionOptions.Builder()
.debugging(false)
.captureConstrains(MBCaptureConstrains.V3)
.build()

debugging controls diagnostics. The MBUIOptions visibility properties control the user-facing interface.

Customize V3 messages​

val lightingTexts = MBImageQualityStatusTexts(
checkingLighting = "Checking the light…",
validLighting = "Lighting looks good",
insufficientLight = "Move to a brighter area",
unevenLighting = "Use even lighting on both sides of your face"
)

val localizations = MBTextLocalizationsBoundingBox(
countdownLabelText = "Hold still",
imageQualityStatusTexts = lightingTexts
)

val style = MBUIOptions.Builder()
.faceStatusLabel(true)
.countdownTimerLabel(true)
.textLocalizationBondingBox(localizations)
.build()

The public builder method retains the spelling textLocalizationBondingBox.

V3 lighting messages​

PropertyDefault textStatus
checkingLightingChecking lighting…CHECKING
validLightingLighting looks goodVALID
insufficientLightMove to a brighter areaINSUFFICIENT_LIGHT
unevenLightingUse even lighting on both sides of your faceUNEVEN_LIGHTING

Customize geometry messages​

MBTextLocalizationsBoundingBox also accepts:

  • MBFacePositionStatusText for up, down, left, right, and face-not-found guidance
  • MBFaceDistanceStatusText for too-close and too-far guidance
  • MBFacePoseStatusTexts for yaw, pitch, and roll guidance
val localizations = MBTextLocalizationsBoundingBox(
faceDistanceStatusTexts = MBFaceDistanceStatusText(
faceTooFarAway = "Move closer",
faceTooClose = "Move farther away"
),
imageQualityStatusTexts = lightingTexts
)

Keep instructions short and actionable. When several checks fail, guide the user through geometry first and lighting second.