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
| Property | Default text | Status |
|---|---|---|
checkingLighting | Checking lighting… | CHECKING |
validLighting | Lighting looks good | VALID |
insufficientLight | Move to a brighter area | INSUFFICIENT_LIGHT |
unevenLighting | Use even lighting on both sides of your face | UNEVEN_LIGHTING |
Customize geometry messages
MBTextLocalizationsBoundingBox also accepts:
MBFacePositionStatusTextfor up, down, left, right, and face-not-found guidanceMBFaceDistanceStatusTextfor too-close and too-far guidanceMBFacePoseStatusTextsfor 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.