Skip to content

Selfie Check and Capture Use case#1062

Merged
davidz25 merged 1 commit into
openwallet-foundation:mainfrom
koukarine:facecapturing
Jun 25, 2025
Merged

Selfie Check and Capture Use case#1062
davidz25 merged 1 commit into
openwallet-foundation:mainfrom
koukarine:facecapturing

Conversation

@koukarine

@koukarine koukarine commented Jun 9, 2025

Copy link
Copy Markdown
Contributor

Implement Selfie Check and capture flow.

  • Use directions to navigate the user through several selfie liveness checks.
  • Confirm checks passing using MLKit.
  • Capture selfie bitmap if checks passed.

Tests: manually verify happy and unhappy paths using TestApp on Android and iOS.

Ticket: #1071

  • Tests pass

@koukarine koukarine changed the title Selfie Check an capture Use case Selfie Check and capture Use case Jun 9, 2025
@koukarine koukarine changed the title Selfie Check and capture Use case Selfie Check and Capture Use case Jun 9, 2025
@koukarine
koukarine force-pushed the facecapturing branch 13 times, most recently from b027d41 to 5a03c32 Compare June 13, 2025 21:52
@davidz25

Copy link
Copy Markdown
Contributor

I have problems building your branch since I updated to a more recent version of XCode. If you could rebase to tip-of-tree that'd be nice (in general it's a good idea to do that before every PR push, your branch is currently 8 commits behind).

Also, PR #1102 also adds a function to encode a PNG from an ImageBitmap, I think this implementation is a bit simpler.

@koukarine
koukarine force-pushed the facecapturing branch 5 times, most recently from ec04a9d to 16636ee Compare June 19, 2025 01:19
@davidz25

Copy link
Copy Markdown
Contributor

This looks very good!

A couple of minor suggestions / nitpicks!

  • I think it's distracting that the first page shows video, suggest to remove the video, that way there's also more room for text.
  • For the look around, can we do full 360 instead of 180? Also would like haptic feedback every time another part of the circle is filled.
  • The captured selfie cuts the top of my head of, can we zoom out a tiny bit?
  • All screens seem to have a "Close" in the bottom right. I think it should instead be a X in the top-right. This should also save a little bit of vertical space.
  • On the final screen clicking the checkbox completes the process which is a bit weird. Instead, I think there should be a "Send" button which is inactive until the checkbox is checked. So in this case the user would click the checkbox, then press "Send".
  • I don't think we need the screen saying "DONE" at the end.
  • On the final screen text for the checkbox to "I consent to sharing this image with $identityIssuer"
  • On the first screen change the text to three paragraphs and make the font normal weight, not bold:
    • To verify your identity you will be asked to perform a series of head movements in the following screens.
    • All analysis is local, doesn't leave the device, and isn't shared with anyone. One of the video frames from the verification will be shared with $identityIssuer at the end, after your approval.
    • Please do this in a well-lit room and without any distractions in the background
  • Change "Start Selfie Check" to "Start Verification" and make the button right-aligned instead of filling the width.
  • Change "[Identity User]" to "Utopia Department of Motor Vehicles" and use bold when using it in the composable so it stands out.
  • Change "Capture Selfie" on SelfieCheckScreen to "Selfie Verification for Utopia Department of Motor Vehicles"

As for colors, I noticed that we're hardcoding some colors and that might be fine... but would it make sense to use it from MaterialTheme?

Comment thread multipaz-compose/src/iosMain/kotlin/org/multipaz/compose/Util.ios.kt Outdated

val cgImage = CGBitmapContextCreateImage(context)
return cgImage?.let { UIImage.imageWithCGImage(it) }
}

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Should this be internal / private?

Copy link
Copy Markdown
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

No. That's the Compose.Util class. It's used in faceDetector module. We decided to consolidate useful iOS graphics tools in Compose module during the last week review.

Comment thread multipaz-mlkit/src/commonMain/kotlin/org/multipaz/selfiecheck/SelfieCheck.kt Outdated
@koukarine
koukarine force-pushed the facecapturing branch 3 times, most recently from 7316e1b to b6ea92c Compare June 24, 2025 23:34
Test: All Unit tests are passing (bar KI).
Test: Manually tested via samples/testapp on Android and iOS.

Signed-off-by: koukarine <koukarine@google.com>

@davidz25 davidz25 left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

LGTM, thanks for all your work on this!

@davidz25
davidz25 merged commit b97626b into openwallet-foundation:main Jun 25, 2025
3 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants