Thanks to visit codestin.com
Credit goes to github.com

Skip to content

Conversation

Pearapps
Copy link
Collaborator

@Pearapps Pearapps commented Aug 6, 2025

Progress on #8511

This begins matching large portion of the functionality of the web flow, by allowing the more specific copy for only one, two and 3 available id types.

Testing

  • Use the identity example app
  • Select a variety of the "Allowed Types"
  • Tap verify identity
  • Ensure the copy on the top text and the second smaller text mentions the specific ID type. (live capture only)

You can also do this for > 2 available types and it should revert to using "Identity Document" copy instead of specifying individual types.

See these screenshots (the camera part is blocked on purpose, so don't worry about that) for some of the the primary parts of copy.

Live capture for the one capture set of screens.

With just 1 available type:

share_6806492412397250620

With 2 available types:

share_2044630613708088157

with 3 available types:

share_5742718477943672619

Copy link
Contributor

github-actions bot commented Aug 6, 2025

Diffuse output:

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

          │           compressed            │           uncompressed            
          ├───────────┬───────────┬─────────┼───────────┬───────────┬───────────
 APK      │ old       │ new       │ diff    │ old       │ new       │ diff      
──────────┼───────────┼───────────┼─────────┼───────────┼───────────┼───────────
      dex │   2.1 MiB │   2.1 MiB │  +3 KiB │   4.3 MiB │   4.3 MiB │  +4.8 KiB 
     arsc │     1 MiB │   1.1 MiB │ +19 KiB │     1 MiB │   1.1 MiB │   +19 KiB 
 manifest │   2.3 KiB │   2.3 KiB │     0 B │     8 KiB │     8 KiB │       0 B 
      res │ 302.7 KiB │ 302.7 KiB │     0 B │ 456.5 KiB │ 456.5 KiB │       0 B 
   native │   7.9 MiB │   7.9 MiB │     0 B │  19.3 MiB │  19.3 MiB │       0 B 
    asset │   7.7 KiB │   7.7 KiB │   -14 B │   7.5 KiB │   7.4 KiB │     -14 B 
    other │  95.7 KiB │  95.7 KiB │    -3 B │ 183.5 KiB │ 183.5 KiB │       0 B 
──────────┼───────────┼───────────┼─────────┼───────────┼───────────┼───────────
    total │  11.4 MiB │  11.4 MiB │ +22 KiB │  25.3 MiB │  25.3 MiB │ +23.8 KiB 

 DEX     │ old   │ new   │ diff              
─────────┼───────┼───────┼───────────────────
   files │     1 │     1 │   0               
 strings │ 20687 │ 20699 │ +12 (+30 -18)     
   types │  6505 │  6513 │  +8 (+23 -15)     
 classes │  5269 │  5277 │  +8 (+10 -2)      
 methods │ 31515 │ 31547 │ +32 (+1188 -1156) 
  fields │ 18235 │ 18262 │ +27 (+968 -941)   

 ARSC    │ old  │ new  │ diff         
─────────┼──────┼──────┼──────────────
 configs │  164 │  164 │   0          
 entries │ 3648 │ 3665 │ +17 (+17 -0)
APK
     compressed     │     uncompressed     │                                           
──────────┬─────────┼──────────┬───────────┤                                           
 size     │ diff    │ size     │ diff      │ path                                      
──────────┼─────────┼──────────┼───────────┼───────────────────────────────────────────
  1.1 MiB │ +19 KiB │  1.1 MiB │   +19 KiB │ ∆ resources.arsc                          
  2.1 MiB │  +3 KiB │  4.3 MiB │  +4.8 KiB │ ∆ classes.dex                             
  6.8 KiB │   -12 B │  6.7 KiB │     -12 B │ ∆ assets/dexopt/baseline.prof             
 25.9 KiB │    -5 B │ 64.5 KiB │       0 B │ ∆ META-INF/MANIFEST.MF                    
    909 B │    -2 B │    777 B │      -2 B │ ∆ assets/dexopt/baseline.profm            
    272 B │    +1 B │    120 B │       0 B │ ∆ META-INF/version-control-info.textproto 
 29.2 KiB │    +1 B │ 64.6 KiB │       0 B │ ∆ META-INF/CERT.SF                        
──────────┼─────────┼──────────┼───────────┼───────────────────────────────────────────
  3.2 MiB │ +22 KiB │  5.5 MiB │ +23.8 KiB │ (total)
DEX
STRINGS:

   old   │ new   │ diff          
  ───────┼───────┼───────────────
   20687 │ 20699 │ +12 (+30 -18) 
  
  + 'awaitClose { yourCallbackOrListener.cancel() }' should be used in the end of callbackFlow block.
  Otherwise, a callback/listener may leak in case of external cancellation.
  See callbackFlow API documentation for the details.
  + Buffer size should be non-negative, BUFFERED, or CONFLATED, but was 
  + LL4/B0;
  + LO4/b0;
  + LO4/c0;
  + LW3/i1;
  + LY3/m0;
  + Landroidx/lifecycle/W_a;
  + Landroidx/lifecycle/i0;
  + Landroidx/lifecycle/j0;
  + Landroidx/lifecycle/k0;
  + Landroidx/lifecycle/l0;
  + VLILLLLLLLLI
  + VLLLLLB
  + [LL4/S;
  + [LL4/s0;
  + [LO4/F;
  + [LO4/N;
  + [LO4/O;
  + [LO4/b0;
  + [LO4/h;
  + [LW3/a1;
  + [LW3/l0;
  + [LW3/z0;
  + [Landroidx/lifecycle/q;
  + [Landroidx/lifecycle/v;
  + [Landroidx/lifecycle/w;
  + ] -> 
  + block[
  + ~~R8{"backend":"dex","compilation-mode":"release","has-checksums":false,"min-api":21,"pg-map-id":"94c2797","r8-mode":"full","version":"8.8.34"}
  
  - Landroidx/lifecycle/N_a;
  - Lh4/E;
  - VLILLLLLLI
  - VLLLB
  - [LL4/Q;
  - [LL4/r0;
  - [LO4/D;
  - [LO4/L;
  - [LO4/M;
  - [LO4/Z;
  - [LO4/f;
  - [LW3/Z0;
  - [LW3/k0;
  - [LW3/y0;
  - [Landroidx/lifecycle/m;
  - [Landroidx/lifecycle/r;
  - [Landroidx/lifecycle/s;
  - ~~R8{"backend":"dex","compilation-mode":"release","has-checksums":false,"min-api":21,"pg-map-id":"f717ce8","r8-mode":"full","version":"8.8.34"}
  

TYPES:

   old  │ new  │ diff         
  ──────┼──────┼──────────────
   6505 │ 6513 │ +8 (+23 -15) 
  
  + LL4/B0;
  + LO4/b0;
  + LO4/c0;
  + LW3/i1;
  + LY3/m0;
  + Landroidx/lifecycle/W_a;
  + Landroidx/lifecycle/i0;
  + Landroidx/lifecycle/j0;
  + Landroidx/lifecycle/k0;
  + Landroidx/lifecycle/l0;
  + [LL4/S;
  + [LL4/s0;
  + [LO4/F;
  + [LO4/N;
  + [LO4/O;
  + [LO4/b0;
  + [LO4/h;
  + [LW3/a1;
  + [LW3/l0;
  + [LW3/z0;
  + [Landroidx/lifecycle/q;
  + [Landroidx/lifecycle/v;
  + [Landroidx/lifecycle/w;
  
  - Landroidx/lifecycle/N_a;
  - Lh4/E;
  - [LL4/Q;
  - [LL4/r0;
  - [LO4/D;
  - [LO4/L;
  - [LO4/M;
  - [LO4/Z;
  - [LO4/f;
  - [LW3/Z0;
  - [LW3/k0;
  - [LW3/y0;
  - [Landroidx/lifecycle/m;
  - [Landroidx/lifecycle/r;
  - [Landroidx/lifecycle/s;
  

METHODS:

   old   │ new   │ diff              
  ───────┼───────┼───────────────────
   31515 │ 31547 │ +32 (+1188 -1156) 
  
  + A.j f(C0, int, Bundle) → boolean
  + A2.b B(B)
  + A2.b C(B)
  + A2.b D(B)
  + A2.b G(B)
  + A2.b k(B, g) → b
  + A2.b q(B) → c
  + A2.b v(B) → boolean
  + A2.d <init>(j0, h0, b)
  + A2.d L(e, String) → f0
  + A2.d U(A, l, l, c) → Object
  + A2.j0 b(View) → C0
  + B2.b i(B, v)
  + B2.c i(B, v)
  + C4.a f(C, X, f, p, int)
  + C4.a i(C, X, a, p, int)
  + C4.a o(X, String, j, p, int, int)
  + C4.a u(String, A, String, o, I, g, d, d, p, int)
  + D.d G(N, j, p) → V
  + D.d M(j, X, m, B)
  + D.d b(C, X, r, p, int)
  + D.d d(j, int, j, m, X, B, f, e, a, p, int)
  + D.d e(C, X, e, p, int)
  + D.d j(j, m, X, B, J, C, p, int)
  + D.d m(j, Integer, O0, X, m, C, B, m, p, int)
  + D.d n(C, X, m0, p, int)
  + E1.j getLifecycleOwner() → B
  + E1.j setLifecycleOwner(B)
  + G.e M(X, String, o, String, String, e0, e0, p, int, int)
  + G.e N(C, X, a, a, f, r, c, q, a, l0, c, p, int)
  + G.e Q(o, String, z0, a, p, int)
  + G.e R(o, String, z0, a, p, int)
  + G.e V(C, X, p, int)
  + H.h G(X, C, d, p, int)
  + H.h H(X, C, d, p, int)
  + H.h I(C, X, p, int)
  + H.h T(C, X, p, int)
  + H0.r <init>(c0, Object)
  + J0.d c(B)
  + J0.d onDestroy(B)
  + J0.d onPause(B)
  + J0.d onResume(B)
  + J0.d onStart(B)
  + J0.d onStop(B)
  + L3.j <init>(r, X, C)
  + L4.A0 b(r, int)
  + L4.B0 <clinit>()
  + L4.B A(h, e, c) → Object
  + L4.B B(long, e, c) → Object
  + L4.B C(c) → Object
  + L4.B b(c)
  + L4.B c(y, CancellationException)
  + L4.B d(c0, i) → Object
  + L4.B e(e, c) → Object
  + L4.B f(long, c) → Object
  + L4.B g(h)
  + L4.B h(h, h, boolean) → h
  + L4.B i(h) → G
  + L4.B j(Object) → String
  + L4.B k(h) → c0
  + L4.B l(c) → l
  + L4.B m(Throwable, h)
  + L4.B n(c0, boolean, f0) → M
  + L4.B o(y) → boolean
  + L4.B p(h) → boolean
  + L4.B q(int) → boolean
  + L4.B r(y, h, e, int) → q0
  + L4.B s(y, h) → h
  + L4.B t(Object) → Object
  + L4.B u(l, c, boolean)
  + L4.B v(h, e) → Object
  + L4.B w(v0, e) → Object
  + L4.B x(c) → String
  + L4.B y(Object) → Object
  + L4.B z(c, h, Object) → y0
  + L4.C J(long, S)
  + L4.C o(long, Runnable, h) → M
  + L4.G o(long, Runnable, h) → M
  + L4.H l(Object) → Object
  + L4.I <init>(Throwable, u,
...✂
ARSC
ENTRIES:

   old  │ new  │ diff         
  ──────┼──────┼──────────────
   3648 │ 3665 │ +17 (+17 -0) 
  + string/stripe_back_of_dl
  + string/stripe_back_of_driver_license_or_id
  + string/stripe_flip_driver_license_or_id
  + string/stripe_flip_id_document
  + string/stripe_front_of_all_id_types
  + string/stripe_front_of_dl
  + string/stripe_front_of_driver_license_or_id
  + string/stripe_front_of_driver_license_or_passport
  + string/stripe_front_of_passport
  + string/stripe_front_of_passport_or_id
  + string/stripe_position_all_id_types
  + string/stripe_position_dl_back
  + string/stripe_position_dl_front
  + string/stripe_position_driver_license_or_id
  + string/stripe_position_driver_license_or_passport
  + string/stripe_position_passport
  + string/stripe_position_passport_or_id

@Pearapps Pearapps changed the title [Draft] Fixing copy around specific document types in document capture in Identity Fixing copy around specific document types in document capture in Identity SDK Aug 11, 2025
@Pearapps Pearapps marked this pull request as ready for review August 11, 2025 17:52
@Pearapps Pearapps requested review from a team as code owners August 11, 2025 17:52
@Pearapps Pearapps requested a review from aywang-stripe August 11, 2025 17:52
Copy link
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.

Copy link

emerge-tools bot commented Sep 18, 2025

2 builds increased size, 1 build had no size change

Name Version Download Change Install Change Approval
Stripe Identity Example
com.stripe.android.identity.example.theme1
21.26.2-theme1 (20) 4.3 MB ⬆️ 3.1 kB (0.07%) 9.9 MB ⬆️ 7.7 kB (0.08%) N/A
Financial Connections Example
com.stripe.android.financialconnections.example
21.26.2 (212602) 4.6 MB - 10.2 MB - N/A
PaymentSheet Example
com.stripe.android.paymentsheet.example
21.26.2 (11) 8.4 MB ⬆️ 12 B 17.5 MB - N/A

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

⚖️ Compare build
⏱️ Analyze build performance

Total install size change: ⬆️ 7.7 kB (0.08%)
Total download size change: ⬆️ 3.1 kB (0.07%)

Largest size changes

Item Install Size Change Download Size Change
📝 com.stripe.android.identity.viewmodel.IdentityViewModel$IdentityV... ⬆️ 3.6 kB ⬆️ 1.8 kB
com.stripe.android.identity.viewmodel.DocumentScanViewModel$Docum... ⬇️ -2.4 kB ⬇️ -1.2 kB
com.stripe.android.identity.viewmodel.DocumentScanViewModel ⬆️ 1.9 kB ⬆️ 890 B
🗑 kotlinx.coroutines.flow.FlowKt__MergeKt$mapLatest$1 ⬇️ -1.8 kB ⬇️ -849 B
📝 kotlinx.coroutines.flow.FlowKt__ZipKt$combine$$inlined$combineUns... ⬆️ 1.8 kB ⬆️ 844 B
View Treemap

Image of diff

Financial Connections Example 21.26.2 (212602)
com.stripe.android.financialconnections.example

No changes to report

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

⚖️ Compare build
⏱️ Analyze build performance

Total install size change: 0 B
Total download size change: ⬆️ 12 B

Largest size changes

Item Install Size Change Download Size Change
Other ⬆️ 0 B ⬆️ 12 B

🛸 Powered by Emerge Tools

@Pearapps Pearapps merged commit 04f3c83 into master Sep 18, 2025
13 checks passed
@Pearapps Pearapps deleted the kpa/identity-copy-scan branch September 18, 2025 21:34
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.

3 participants