Skip to content

[Identity] Project Orion#13176

Open
Pearapps wants to merge 28 commits into
masterfrom
kpa/orion-pt-1
Open

[Identity] Project Orion#13176
Pearapps wants to merge 28 commits into
masterfrom
kpa/orion-pt-1

Conversation

@Pearapps

@Pearapps Pearapps commented Jun 1, 2026

Copy link
Copy Markdown
Collaborator

Progress on stripe/stripe-ios#6423

This started as a pass on the selfie capture UX but has gotten a lot bigger since the original description

It now includes most of the actual Orion / 3D selfie capture flow on iOS, including the new UI, MediaPipe face pose detection, left and right pose capture, server driven experiment gating, uploads, and the additional API data

  • updates the overall selfie capture flow

    • removes the extra selfies captured screen at the end
    • keeps the user on the camera after the final image instead of moving to a separate review state
    • freezes and blurs the last captured image while we check and save everything
    • shows the saving and error states directly inside the camera UI
    • adds the Having trouble? action below the viewfinder
    • keeps the existing legacy flow when 3D capture is not enabled
  • adds the new oval / tick mark face guide

    • draws the capture guide using animated ticks around the viewfinder
    • shows the centered shadow treatment when the user is in the right position
    • updates the ticks as the user moves through the different capture states
    • adds progress, success, and transition animations instead of abruptly changing states
    • supports the different front, left, and right pose instructions
    • updates the status treatment depending on whether we are positioning, capturing, checking, saving, or showing an error
  • adds the full front → left → right 3D capture flow

    • starts with the normal front-facing selfie capture
    • asks the user to slowly turn left and then right
    • shows directional guidance for each side
    • looks for the best frame during each pose capture window
    • gives visual, haptic, and audio feedback when a pose is accepted
    • adds a fallback path so the flow does not get completely stuck if someone cannot reach the ideal side pose
    • transitions between poses without leaving the camera
  • adds MediaPipe face pose detection

    • adds the local MediaPipe package and runtime wiring
    • loads the face landmarker model with the other Identity ML models
    • uses face landmarks and blendshapes to calculate yaw, pitch, and roll in real time
    • passes that information through the existing face scanner
    • uses the pose information to determine when the user has reached the requested left or right pose
    • keeps the MediaPipe work behind the 3D capture gate so it is not loaded for the legacy flow
  • makes the 3D flow server driven

    • reads the selfie pose_sequence returned by the Verification Page API
    • also reads the new top-level experiments response
    • uses those fields to decide whether to
      • load the MediaPipe face models
      • show the new 3D capture UI
      • capture the left and right poses
      • submit the additional 3D data
    • leaves the local override as nil so the normal behavior is controlled by the server
    • keeps the experiment exposure analytics connected to the selfie screen being presented
  • uploads and submits the new 3D selfie data

    • still sends the first, best, and last front images in high and low resolution
    • also uploads the selected left and right images
    • submits those images as
      • left_high_res_image
      • right_high_res_image
    • includes frame data for the accepted front and side captures
      • yaw, pitch, and roll
      • face bounds and input size
      • face score and score variance
      • capture timestamp and capture order
      • camera information
      • compacted face landmark / blendshape results
    • compacts the face landmark result so it stays below the API’s 5000 character limit
    • only includes the new side-pose fields when 3D capture is enabled for the session
  • adds a bunch of polish around the capture state machine

    • clearer instructions for positioning and holding still
    • different timing for the front and side pose acknowledgements
    • animated transitions between instructions
    • capture success feedback before moving to the next pose
    • updated checking, saving, retry, and error behavior
    • better handling for camera interruptions and captures that cannot be completed normally
  • Adds and updates tests

    • coverage for the experiment and pose_sequence gating
    • coverage for enabling and disabling the 3D flow
    • coverage for submitting the left and right image fields
    • coverage for the additional frame metadata
    • coverage for compacting the face landmark payload
    • coverage for capture ordering and timestamps
    • updates the affected selfie snapshots for the new oval, instructions, and saving states

@github-actions

github-actions Bot commented Jun 1, 2026

Copy link
Copy Markdown
Contributor

Diffuse output:

OLD: identity-example-release-base.apk (signature: V1, V2)
NEW: identity-example-release-pr.apk (signature: V2)

          │            compressed             │            uncompressed            
          ├───────────┬───────────┬───────────┼───────────┬───────────┬────────────
 APK      │ old       │ new       │ diff      │ old       │ new       │ diff       
──────────┼───────────┼───────────┼───────────┼───────────┼───────────┼────────────
      dex │   2.2 MiB │   2.3 MiB │ +77.1 KiB │   4.6 MiB │   4.8 MiB │ +190.5 KiB 
     arsc │   1.2 MiB │   1.2 MiB │  -5.9 KiB │   1.2 MiB │   1.2 MiB │   -5.9 KiB 
 manifest │   2.3 KiB │   2.5 KiB │    +255 B │     8 KiB │   9.2 KiB │   +1.2 KiB 
      res │   298 KiB │ 389.3 KiB │ +91.3 KiB │ 447.6 KiB │ 537.3 KiB │  +89.7 KiB 
   native │  18.6 MiB │  62.4 MiB │ +43.8 MiB │  18.6 MiB │  62.4 MiB │  +43.8 MiB 
    asset │   7.9 KiB │   3.2 MiB │  +3.2 MiB │   7.7 KiB │   3.6 MiB │   +3.6 MiB 
    other │ 110.1 KiB │  77.2 KiB │ -32.9 KiB │ 235.1 KiB │ 155.5 KiB │  -79.5 KiB 
──────────┼───────────┼───────────┼───────────┼───────────┼───────────┼────────────
    total │  22.4 MiB │  69.5 MiB │ +47.1 MiB │    25 MiB │  72.6 MiB │  +47.6 MiB 

 DEX     │ old   │ new   │ diff                  
─────────┼───────┼───────┼───────────────────────
   files │     1 │     1 │     0                 
 strings │ 22245 │ 23424 │ +1179 (+4792 -3613)   
   types │  6631 │  6915 │  +284 (+3652 -3368)   
 classes │  5354 │  5573 │  +219 (+3278 -3059)   
 methods │ 32422 │ 32122 │  -300 (+24511 -24811) 
  fields │ 18756 │ 19113 │  +357 (+17902 -17545) 

 ARSC    │ old  │ new  │ diff        
─────────┼──────┼──────┼─────────────
 configs │  158 │  157 │ -1 (+0 -1)  
 entries │ 3982 │ 3989 │ +7 (+12 -5)
APK
      compressed      │     uncompressed      │                                                              
──────────┬───────────┼──────────┬────────────┤                                                              
 size     │ diff      │ size     │ diff       │ path                                                         
──────────┼───────────┼──────────┼────────────┼──────────────────────────────────────────────────────────────
 14.3 MiB │ +14.3 MiB │ 14.3 MiB │  +14.3 MiB │ + lib/x86/libmediapipe_tasks_jni.so                          
 12.4 MiB │ +12.4 MiB │ 12.4 MiB │  +12.4 MiB │ + lib/x86_64/libmediapipe_tasks_jni.so                       
   10 MiB │   +10 MiB │   10 MiB │    +10 MiB │ + lib/arm64-v8a/libmediapipe_tasks_jni.so                    
  7.1 MiB │  +7.1 MiB │  7.1 MiB │   +7.1 MiB │ + lib/armeabi-v7a/libmediapipe_tasks_jni.so                  
  3.2 MiB │  +3.2 MiB │  3.6 MiB │   +3.6 MiB │ + assets/face_landmarker.task                                
  2.3 MiB │ +77.1 KiB │  4.8 MiB │ +190.5 KiB │ ∆ classes.dex                                                
 44.5 KiB │ +44.5 KiB │ 44.4 KiB │  +44.4 KiB │ + res/GI.png                                                 
          │ -29.3 KiB │          │    -65 KiB │ - META-INF/CERT.SF                                           
          │ -25.8 KiB │          │  -64.9 KiB │ - META-INF/MANIFEST.MF                                       
 25.7 KiB │ +25.7 KiB │ 25.6 KiB │  +25.6 KiB │ + res/Sg.png                                                 
 14.8 KiB │ +14.8 KiB │ 14.7 KiB │  +14.7 KiB │ + res/UV.png                                                 
  7.9 KiB │  +7.9 KiB │  7.8 KiB │   +7.8 KiB │ + res/Y2.png                                                 
  1.2 MiB │  -5.9 KiB │  1.2 MiB │   -5.9 KiB │ ∆ resources.arsc                                             
  3.2 KiB │  +3.2 KiB │    8 KiB │     +8 KiB │ + google/protobuf/field_mask.proto                           
    3 KiB │    +3 KiB │  7.5 KiB │   +7.5 KiB │ + google/protobuf/api.proto                                  
  2.9 KiB │  +2.9 KiB │  6.3 KiB │   +6.3 KiB │ + google/protobuf/timestamp.proto                            
  2.7 KiB │  +2.7 KiB │    6 KiB │     +6 KiB │ + google/protobuf/any.proto                                  
  2.4 KiB │  +2.4 KiB │  6.2 KiB │   +6.2 KiB │ + google/protobuf/type.proto                                 
  2.1 KiB │  +2.1 KiB │  4.8 KiB │   +4.8 KiB │ + google/protobuf/duration.proto                             
  1.8 KiB │  +1.8 KiB │  3.7 KiB │   +3.7 KiB │ + google/protobuf/struct.proto                               
  1.6 KiB │  +1.6 KiB │  3.9 KiB │   +3.9 KiB │ + google/protobuf/wrappers.proto                             
  1.3 KiB │  +1.3 KiB │  2.3 KiB │   +2.3 KiB │ + google/protobuf/source_context.proto                       
  1.3 KiB │  +1.3 KiB │  2.3 KiB │   +2.3 KiB │ + google/protobuf/empty.proto                                
          │  -1.2 KiB │          │   -1.2 KiB │ - META-INF/CERT.RSA                                          
          │    -833 B │          │   -1.9 KiB │ - res/f-.xml                                                 
          │    -433 B │          │     -500 B │ - res/color-v23/abc_btn_colored_borderless_text_material.xml 
          │    -412 B │          │     -500 B │ - res/color-v23/abc_btn_colored_text_material.xml            
  6.7 KiB │    -286 B │  6.6 KiB │     -286 B │ ∆ assets/dexopt/baseline.prof                                
  2.5 KiB │    +255 B │  9.2 KiB │   +1.2 KiB │ ∆ AndroidManifest.xml                                        
    198 B │    +198 B │     84 B │      +84 B │ + firebase-encoders-proto.properties                         
    195 B │    +195 B │     82 B │      +82 B │ + firebase-encoders-json.properties                          
    192 B │    +192 B │     78 B │      +78 B │ + transport-backend-cct.properties                           
    180 B │    +180 B │     72 B │      +72 B │ + firebase-encoders.properties                               
    180 B │    +180 B │     70 B │      +70 B │ + transport-runtime.properties                               
    168 B │    +168 B │     62 B │      +62 B │ + transport-api.properties                                   
    127 B │    +127 B │      5 B │       +5 B │ + META-INF/services/ad.w                                     
    127 B │    +127 B │      5 B │       +5 B │ + META-INF/services/bd.a                            
...✂
MANIFEST
@@ -11,3 +11,3 @@
   <uses-sdk
-      android:minSdkVersion="23"
+      android:minSdkVersion="24"
       android:targetSdkVersion="36"
@@ -143,2 +143,20 @@
     </receiver>
+    <service
+        android:exported="false"
+        android:name="com.google.android.datatransport.runtime.backends.TransportBackendDiscovery"
+        >
+      <meta-data
+          android:name="backend:com.google.android.datatransport.cct.CctBackendFactory"
+          android:value="cct"
+          />
+    </service>
+    <service
+        android:exported="false"
+        android:name="com.google.android.datatransport.runtime.scheduling.jobscheduling.JobInfoSchedulerService"
+        android:permission="android.permission.BIND_JOB_SERVICE"
+        />
+    <receiver
+        android:exported="false"
+        android:name="com.google.android.datatransport.runtime.scheduling.jobscheduling.AlarmManagerSchedulerBroadcastReceiver"
+        />
   </application>
DEX
STRINGS:

   old   │ new   │ diff                
  ───────┼───────┼─────────────────────
   22245 │ 23424 │ +1179 (+4792 -3613) 
  
  +

@Pearapps Pearapps changed the title [Draft] [Identity] Orion Redesign pt 1 [Identity] Orion Redesign pt 1 Jun 2, 2026
@Pearapps Pearapps requested a review from cjmisenas-stripe June 2, 2026 16:47
@Pearapps Pearapps marked this pull request as ready for review June 2, 2026 16:48
@Pearapps Pearapps requested review from a team as code owners June 2, 2026 16:48
@github-actions

Copy link
Copy Markdown
Contributor

Risky Change

This is considered a risky change because it adjusts the sample app build.gradle, please review carefully.
We've seen issues in the past which resulted in failed builds for merchants. Please make sure the build.gradle change is intended.

By adding the label accept-risky-change to this PR, I acknowledge that I'm changing an example app and have verified that the SDK remains in a shippable state.

@emerge-tools

emerge-tools Bot commented Jul 13, 2026

Copy link
Copy Markdown

3 builds increased size

Name Version Download Change Install Change Approval
⚠️ Stripe Identity Example
com.stripe.android.identity.example.theme1
23.11.1-theme1 (20) 12.6 MB ⬆️ 8.2 MB (184.95%) 24.8 MB ⬆️ 14.6 MB (142.15%) N/A
Financial Connections Example
com.stripe.android.financialconnections.example
23.11.1 (231101) 4.9 MB ⬆️ 34 B 10.9 MB ⬇️ 40 B N/A
PaymentSheet Example
com.stripe.android.paymentsheet.example
23.11.1 (11) 6.2 MB ⬆️ 7.8 kB (0.13%) 14.0 MB ⬆️ 24.6 kB (0.18%) N/A

Stripe Identity Example 23.11.1-theme1 (20)
com.stripe.android.identity.example.theme1

⚖️ Compare build
⏱️ Analyze build performance

Total install size change: ⬆️ 14.6 MB (142.15%)
Total download size change: ⬆️ 8.2 MB (184.95%)

Largest size changes

Item Install Size Change Download Size Change
📝 libmediapipe_tasks_jni.so ⬆️ 10.5 MB ⬆️ 4.7 MB
📝 face_landmarker.task ⬆️ 3.3 MB ⬆️ 3.3 MB
📝 stripe_selfie_warmup.png ⬆️ 45.5 kB ⬆️ 44.7 kB
📝 com.google.mediapipe.tasks.vision.facelandmarker.FaceLandmarksCon... ⬆️ 88.6 kB ⬆️ 42.7 kB
🗑 androidx.compose.foundation.lazy ⬇️ -73.3 kB ⬇️ -35.5 kB
View Treemap

Image of diff

Financial Connections Example 23.11.1 (231101)
com.stripe.android.financialconnections.example

⚖️ Compare build
⏱️ Analyze build performance

Total install size change: ⬇️ 40 B
Total download size change: ⬆️ 34 B

Largest size changes

Item Install Size Change Download Size Change
Other ⬆️ -40 B ⬆️ 34 B

PaymentSheet Example 23.11.1 (11)
com.stripe.android.paymentsheet.example

⚖️ Compare build
⏱️ Analyze build performance

Total install size change: ⬆️ 24.6 kB (0.18%)
Total download size change: ⬆️ 7.8 kB (0.13%)

Largest size changes

Item Install Size Change Download Size Change
🗑 _COROUTINE ⬇️ -53.2 kB ⬇️ -25.0 kB
com.bumptech.glide.GlideBuilder$EnableImageDecoderForBitmaps ⬆️ 32.0 kB ⬆️ 15.0 kB
📝 androidx.compose.ui.unit.AndroidDensity_androidKt ⬆️ 31.1 kB ⬆️ 14.6 kB
🗑 androidx.core.view.KeyEventDispatcher ⬇️ -31.0 kB ⬇️ -14.5 kB
kotlin.collections.MapsKt__MapsKt ⬆️ 24.8 kB ⬆️ 11.6 kB
View Treemap

Image of diff


🛸 Powered by Emerge Tools

Comment trigger: Size diff threshold of 100.00kB exceeded

@Pearapps Pearapps changed the title [Identity] Orion Redesign pt 1 [Identity] Project Orion Jul 13, 2026
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant