-
Notifications
You must be signed in to change notification settings - Fork 14
Open
Labels
questionFurther information is requestedFurther information is requested
Description
Hi team 👋
I’m trying to use the new FaceMovementChallenge in Amplify UI Android on latest version (release v1.6.0).

Here’s my code:
-
On challengeOptions use "faceMovement = LivenessChallenge.FaceMovement(camera = Camera.Front)", I found still display flashing lights.
What it should be :
- "FaceMovementChallenge" (does not require color reflection) → works with both front and back cameras.
- "FaceMovementAndLightChallenge" → works only with the front camera, because it requires colors to reflect off the user’s face. **only one option can be selected
MaterialTheme(colorScheme = LivenessColorScheme.default()) {
FaceLivenessDetector(
sessionId = sessionId,
region = "ap-northeast-1",
credentialsProvider,
disableStartView = false,
challengeOptions = ChallengeOptions(
// faceMovementAndLight = LivenessChallenge.FaceMovementAndLight
faceMovement = LivenessChallenge.FaceMovement(camera = Camera.Front)
),
onComplete = {
viewModel.fetchSessionResult(sessionId)
onChallengeComplete()
},
onError = {
if (it is FaceLivenessDetectionException.UserCancelledException) {
onBack()
} else {
viewModel.reportErrorResult(it)
onChallengeComplete()
}
}
)
}
- From 1), since using FaceMovementChallenge still shows the flashing lights, I tried removing FaceMovementAndLightChallenge("2.0.0") and using only FaceMovementChallenge("1.0.0"), but then I get this error:
PredictionsException{message=An error occurred during the face liveness flow.,
cause=ValidationException(message=Missing challenge versions or no supported challenge version found.)}
val faceLivenessSessionInformation = FaceLivenessSessionInformation(
videoWidth = TARGET_WIDTH.toFloat(),
videoHeight = TARGET_HEIGHT.toFloat(),
challengeVersions = listOf(
// Challenge.FaceMovementAndLightChallenge("2.0.0"), // removed
Challenge.FaceMovementChallenge("1.0.0")
),
region = region,
preCheckViewEnabled = !disableStartView,
attemptCount = attemptCounter.getCount()
)
What I’ve observed
- If I include FaceMovementAndLightChallenge("2.0.0") or use only FaceMovementAndLightChallenge, it works fine — and correctly still triggers the flashing lights challenge.
- If I try FaceMovementChallenge("1.0.0") by itself, the session fails with the ValidationException above.
My questions are:
- Why does this error occur when I only provide FaceMovementChallenge without FaceMovementAndLightChallenge?
- Did I configure something wrong, or is this the reason why "FaceMovementChallenge" still shows the flashing lights?
Metadata
Metadata
Assignees
Labels
questionFurther information is requestedFurther information is requested