assentify-sdk-react-native 1.0.0-Beta.4 → 1.0.0-Beta.41
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/Package.swift +172 -0
- package/README.md +124 -32
- package/android/build.gradle +1 -6
- package/android/src/main/java/com/assentifysdk/AssentifySdkModule.kt +48 -9
- package/android/src/main/java/com/assentifysdk/FlowActivity.kt +75 -7
- package/android/src/main/java/com/assentifysdk/ScanIDActivity.kt +67 -6
- package/android/src/main/java/com/assentifysdk/ScanPassportActivity.kt +53 -1
- package/android/src/main/res/layout/activity_scan.xml +45 -57
- package/ios/AssentifySdkBaseModule.swift +1 -0
- package/ios/NativeAssentifySdk.mm +19 -2
- package/ios/NativeAssentifySdk.swift +151 -25
- package/ios/UIComponents/RNPassportScanner.swift +4 -3
- package/ios/View/AssentifySdkEventEmitting.swift +10 -0
- package/ios/View/DataDecoder.swift +16 -16
- package/ios/View/FaceMatchController.swift +51 -51
- package/ios/View/IDCardController.swift +93 -37
- package/ios/View/OtherController.swift +33 -33
- package/ios/View/PassportController.swift +84 -36
- package/ios/View/QrController.swift +10 -10
- package/ios/View/UI.swift +77 -26
- package/lib/commonjs/AssentifyProvider.js +3 -0
- package/lib/commonjs/AssentifyProvider.js.map +1 -1
- package/lib/commonjs/AssentifyWrapper.js +4 -4
- package/lib/commonjs/AssentifyWrapper.js.map +1 -1
- package/lib/commonjs/ClickFontWeightType.js +14 -0
- package/lib/commonjs/ClickFontWeightType.js.map +1 -0
- package/lib/commonjs/FlowStepperType.js +11 -0
- package/lib/commonjs/FlowStepperType.js.map +1 -0
- package/lib/commonjs/Language.js +5 -1
- package/lib/commonjs/Language.js.map +1 -1
- package/lib/commonjs/ValidationStyleType.js +11 -0
- package/lib/commonjs/ValidationStyleType.js.map +1 -0
- package/lib/commonjs/index.js +36 -0
- package/lib/commonjs/index.js.map +1 -1
- package/lib/commonjs/types.js.map +1 -1
- package/lib/module/AssentifyProvider.js +4 -0
- package/lib/module/AssentifyProvider.js.map +1 -1
- package/lib/module/AssentifyWrapper.js +4 -4
- package/lib/module/AssentifyWrapper.js.map +1 -1
- package/lib/module/ClickFontWeightType.js +8 -0
- package/lib/module/ClickFontWeightType.js.map +1 -0
- package/lib/module/FlowStepperType.js +5 -0
- package/lib/module/FlowStepperType.js.map +1 -0
- package/lib/module/Language.js +4 -0
- package/lib/module/Language.js.map +1 -1
- package/lib/module/ValidationStyleType.js +5 -0
- package/lib/module/ValidationStyleType.js.map +1 -0
- package/lib/module/index.js +3 -0
- package/lib/module/index.js.map +1 -1
- package/lib/module/types.js.map +1 -1
- package/lib/typescript/babel.config.d.ts +0 -1
- package/lib/typescript/example/babel.config.d.ts +36 -5
- package/lib/typescript/example/babel.config.d.ts.map +1 -1
- package/lib/typescript/example/metro.config.d.ts +9 -1
- package/lib/typescript/example/metro.config.d.ts.map +1 -1
- package/lib/typescript/example/react-native.config.d.ts +34 -3
- package/lib/typescript/example/react-native.config.d.ts.map +1 -1
- package/lib/typescript/example/src/App.d.ts.map +1 -1
- package/lib/typescript/example/src/Home.d.ts.map +1 -1
- package/lib/typescript/lib/commonjs/AssentifyProvider.d.ts.map +1 -1
- package/lib/typescript/lib/commonjs/AssentifyWrapper.d.ts +2 -2
- package/lib/typescript/lib/commonjs/AssentifyWrapper.d.ts.map +1 -1
- package/lib/typescript/lib/commonjs/ClickFontWeightType.d.ts +9 -0
- package/lib/typescript/lib/commonjs/ClickFontWeightType.d.ts.map +1 -0
- package/lib/typescript/lib/commonjs/FlowStepperType.d.ts +6 -0
- package/lib/typescript/lib/commonjs/FlowStepperType.d.ts.map +1 -0
- package/lib/typescript/lib/commonjs/Language.d.ts +6 -0
- package/lib/typescript/lib/commonjs/ValidationStyleType.d.ts +6 -0
- package/lib/typescript/lib/commonjs/ValidationStyleType.d.ts.map +1 -0
- package/lib/typescript/lib/module/AssentifyProvider.d.ts.map +1 -1
- package/lib/typescript/lib/module/AssentifyWrapper.d.ts +2 -2
- package/lib/typescript/lib/module/AssentifyWrapper.d.ts.map +1 -1
- package/lib/typescript/lib/module/ClickFontWeightType.d.ts +8 -0
- package/lib/typescript/lib/module/ClickFontWeightType.d.ts.map +1 -0
- package/lib/typescript/lib/module/FlowStepperType.d.ts +5 -0
- package/lib/typescript/lib/module/FlowStepperType.d.ts.map +1 -0
- package/lib/typescript/lib/module/Language.d.ts +6 -0
- package/lib/typescript/lib/module/ValidationStyleType.d.ts +5 -0
- package/lib/typescript/lib/module/ValidationStyleType.d.ts.map +1 -0
- package/lib/typescript/lib/module/index.d.ts +5 -2
- package/lib/typescript/lib/module/index.d.ts.map +1 -1
- package/lib/typescript/src/AssentifyProvider.d.ts.map +1 -1
- package/lib/typescript/src/AssentifyWrapper.d.ts +6 -2
- package/lib/typescript/src/AssentifyWrapper.d.ts.map +1 -1
- package/lib/typescript/src/ClickFontWeightType.d.ts +9 -0
- package/lib/typescript/src/ClickFontWeightType.d.ts.map +1 -0
- package/lib/typescript/src/FlowStepperType.d.ts +6 -0
- package/lib/typescript/src/FlowStepperType.d.ts.map +1 -0
- package/lib/typescript/src/Language.d.ts +5 -0
- package/lib/typescript/src/Language.d.ts.map +1 -1
- package/lib/typescript/src/ValidationStyleType.d.ts +6 -0
- package/lib/typescript/src/ValidationStyleType.d.ts.map +1 -0
- package/lib/typescript/src/index.d.ts +5 -2
- package/lib/typescript/src/index.d.ts.map +1 -1
- package/lib/typescript/src/types.d.ts.map +1 -1
- package/package.json +63 -10
- package/src/AssentifyProvider.tsx +341 -305
- package/src/AssentifyWrapper.ts +47 -6
- package/src/ClickFontWeightType.ts +10 -0
- package/src/FlowStepperType.ts +7 -0
- package/src/Language.ts +7 -0
- package/src/ValidationStyleType.ts +7 -0
- package/src/index.ts +3 -0
- package/src/types.ts +1 -0
- package/assentify-sdk.podspec +0 -44
- package/lib/typescript/example/src/navigator.d.ts +0 -4
- package/lib/typescript/example/src/navigator.d.ts.map +0 -1
|
@@ -32,6 +32,7 @@ import ImageToBase64Converter
|
|
|
32
32
|
import android.content.Intent
|
|
33
33
|
import android.content.res.ColorStateList
|
|
34
34
|
import com.assentify.sdk.Core.Constants.BrightnessEvents
|
|
35
|
+
import com.assentify.sdk.Core.Constants.IdLivenessInstruction
|
|
35
36
|
import com.assentify.sdk.RemoteClient.Models.SubmitRequestModel
|
|
36
37
|
import com.assentify.sdk.ScanIDCard.ScanIDCardManual
|
|
37
38
|
import com.assentify.sdk.ScanIDCard.ScanIDCardResult
|
|
@@ -39,7 +40,8 @@ import com.facebook.react.bridge.Arguments
|
|
|
39
40
|
import com.facebook.react.modules.core.DeviceEventManagerModule
|
|
40
41
|
import com.squareup.picasso.Picasso
|
|
41
42
|
import com.assentify.sdk.RemoteClient.Models.TemplatesByCountry
|
|
42
|
-
|
|
43
|
+
import androidx.constraintlayout.widget.ConstraintLayout
|
|
44
|
+
import android.graphics.Bitmap
|
|
43
45
|
class ScanIDActivity: AppCompatActivity(),
|
|
44
46
|
IDCardCallback {
|
|
45
47
|
|
|
@@ -298,9 +300,12 @@ class ScanIDActivity: AppCompatActivity(),
|
|
|
298
300
|
triggerEvent("onClipPreparationComplete", dataModel)
|
|
299
301
|
}
|
|
300
302
|
|
|
301
|
-
override fun onLivenessUpdate(dataModel: BaseResponseDataModel) {
|
|
303
|
+
override fun onLivenessUpdate(dataModel: BaseResponseDataModel, image: Bitmap?) {
|
|
302
304
|
triggerEvent("onLivenessUpdate", dataModel)
|
|
303
305
|
runOnUiThread {
|
|
306
|
+
if(!isManual){
|
|
307
|
+
scanID.retryLiveness();
|
|
308
|
+
}
|
|
304
309
|
start = false;
|
|
305
310
|
showPopUpMessage(
|
|
306
311
|
R.drawable.id_warning,
|
|
@@ -389,7 +394,63 @@ class ScanIDActivity: AppCompatActivity(),
|
|
|
389
394
|
}
|
|
390
395
|
}
|
|
391
396
|
|
|
397
|
+
// the liveness owns the message while it runs (not after "keep holding" / "barcode read": the result is coming)
|
|
398
|
+
private var livenessActive = false
|
|
399
|
+
|
|
400
|
+
override fun onLivenessInstruction(instruction: IdLivenessInstruction?, progress: Int) {
|
|
401
|
+
if (instruction == null) return
|
|
402
|
+
runOnUiThread {
|
|
403
|
+
livenessActive = instruction != IdLivenessInstruction.KEEP_HOLDING
|
|
404
|
+
&& instruction != IdLivenessInstruction.BARCODE_READ
|
|
405
|
+
|
|
406
|
+
var text = when (instruction) {
|
|
407
|
+
// ---------- position ----------
|
|
408
|
+
IdLivenessInstruction.PLACE_CARD -> "Place the card\nin the frame"
|
|
409
|
+
// ---------- flat hold ----------
|
|
410
|
+
IdLivenessInstruction.KEEP_STEADY -> "Keep it steady"
|
|
411
|
+
IdLivenessInstruction.KEEP_FLAT -> "Hold the card flat"
|
|
412
|
+
IdLivenessInstruction.ADJUST_POSITION -> "Tilt slightly\nto avoid glare"
|
|
413
|
+
// ---------- light ----------
|
|
414
|
+
IdLivenessInstruction.DO_NOT_MOVE -> "Keep it steady\nLight is on"
|
|
415
|
+
// ---------- tilt ----------
|
|
416
|
+
IdLivenessInstruction.LIFT_RIGHT -> "Lift the right edge\ntoward you"
|
|
417
|
+
IdLivenessInstruction.LIFT_TOP -> "Lift the top edge\ntoward you"
|
|
418
|
+
IdLivenessInstruction.LIFT_BOTTOM -> "Lift the bottom edge\ntoward you"
|
|
419
|
+
IdLivenessInstruction.A_BIT_MORE -> "A bit more\nand hold"
|
|
420
|
+
IdLivenessInstruction.HOLD_THERE -> "Hold it there"
|
|
421
|
+
IdLivenessInstruction.OTHER_EDGE -> "Lift the other edge"
|
|
422
|
+
IdLivenessInstruction.PICK_UP -> "Hold the card\nin your hand"
|
|
423
|
+
// ---------- done ----------
|
|
424
|
+
IdLivenessInstruction.KEEP_HOLDING -> "Keep holding\nAlmost done"
|
|
425
|
+
// ---------- ID back: the barcode ----------
|
|
426
|
+
IdLivenessInstruction.READING_BARCODE -> "Reading the barcode\nKeep it steady"
|
|
427
|
+
IdLivenessInstruction.BARCODE_READ -> "Barcode read"
|
|
428
|
+
// ---------- pauses (the SDK continues by itself after a few seconds) ----------
|
|
429
|
+
IdLivenessInstruction.HOLD_IN_HAND -> "Hold it in your hand\nnot on the table"
|
|
430
|
+
IdLivenessInstruction.PHONE_TURNED -> "Keep the phone still\nTilt the card"
|
|
431
|
+
IdLivenessInstruction.TOO_BRIGHT -> "Too much light\nMove to the shade"
|
|
432
|
+
}
|
|
433
|
+
|
|
434
|
+
// the tilt progress (0..100), on its own line, only while the card is being tilted
|
|
435
|
+
when (instruction) {
|
|
436
|
+
IdLivenessInstruction.LIFT_RIGHT,
|
|
437
|
+
IdLivenessInstruction.LIFT_TOP,
|
|
438
|
+
IdLivenessInstruction.LIFT_BOTTOM,
|
|
439
|
+
IdLivenessInstruction.A_BIT_MORE,
|
|
440
|
+
IdLivenessInstruction.HOLD_THERE,
|
|
441
|
+
IdLivenessInstruction.OTHER_EDGE,
|
|
442
|
+
IdLivenessInstruction.PICK_UP -> text += "\n$progress%"
|
|
443
|
+
else -> {}
|
|
444
|
+
}
|
|
445
|
+
|
|
446
|
+
infoLayout.visibility = View.VISIBLE
|
|
447
|
+
infoText.text = text
|
|
448
|
+
infoIcon.setImageDrawable(getResources().getDrawable(R.drawable.zoom_in))
|
|
449
|
+
|
|
450
|
+
}
|
|
451
|
+
}
|
|
392
452
|
override fun onEnvironmentalConditionsChange(brightnessEvents:BrightnessEvents, motion: MotionType,zoom: ZoomType,isCentered: Boolean){
|
|
453
|
+
if (livenessActive) return
|
|
393
454
|
runOnUiThread {
|
|
394
455
|
if(start == false){
|
|
395
456
|
infoLayout.visibility = View.VISIBLE
|
|
@@ -502,7 +563,7 @@ class ScanIDActivity: AppCompatActivity(),
|
|
|
502
563
|
toolbarTitle.setTextColor(Color.parseColor(processingColor))
|
|
503
564
|
|
|
504
565
|
|
|
505
|
-
val backIDPage = findViewById<
|
|
566
|
+
val backIDPage = findViewById<ConstraintLayout>(R.id.backIDPage)
|
|
506
567
|
backIDPage.setBackgroundColor(Color.parseColor(holdHandColor))
|
|
507
568
|
backIDPage.visibility = View.VISIBLE
|
|
508
569
|
|
|
@@ -518,9 +579,9 @@ class ScanIDActivity: AppCompatActivity(),
|
|
|
518
579
|
}
|
|
519
580
|
|
|
520
581
|
val drawableInfo = getResources().getDrawable(R.drawable.info_rounded_background)
|
|
521
|
-
drawableInfo?.setColorFilter(Color.
|
|
582
|
+
drawableInfo?.setColorFilter(Color.WHITE, PorterDuff.Mode.SRC_ATOP)
|
|
522
583
|
nextTemplate.setBackground(drawableInfo)
|
|
523
|
-
|
|
584
|
+
nextTemplate.setTextColor(Color.parseColor(manualClickColor))
|
|
524
585
|
var imageUrl = "";
|
|
525
586
|
if (classifiedTemplate.isNotEmpty()) {
|
|
526
587
|
for (it in templatesByCountry.templates) {
|
|
@@ -548,7 +609,7 @@ class ScanIDActivity: AppCompatActivity(),
|
|
|
548
609
|
toolbarTitle.setText(title)
|
|
549
610
|
toolbarTitle.setTextColor(Color.parseColor(processingColor))
|
|
550
611
|
|
|
551
|
-
val backIDPage = findViewById<
|
|
612
|
+
val backIDPage = findViewById<ConstraintLayout>(R.id.backIDPage)
|
|
552
613
|
backIDPage.setBackgroundColor(Color.parseColor(holdHandColor))
|
|
553
614
|
backIDPage.visibility = View.GONE
|
|
554
615
|
|
|
@@ -38,6 +38,8 @@ import java.text.SimpleDateFormat
|
|
|
38
38
|
import com.assentify.sdk.Core.Constants.BrightnessEvents
|
|
39
39
|
import com.assentify.sdk.ScanPassport.ScanPassportManual
|
|
40
40
|
import com.assentify.sdk.ScanPassport.ScanPassportResult
|
|
41
|
+
import com.assentify.sdk.Core.Constants.PassportLivenessInstruction
|
|
42
|
+
import android.graphics.Bitmap
|
|
41
43
|
|
|
42
44
|
class ScanPassportActivity : AppCompatActivity(),
|
|
43
45
|
ScanPassportCallback {
|
|
@@ -268,9 +270,12 @@ class ScanPassportActivity : AppCompatActivity(),
|
|
|
268
270
|
}
|
|
269
271
|
}
|
|
270
272
|
|
|
271
|
-
override fun onLivenessUpdate(dataModel: BaseResponseDataModel) {
|
|
273
|
+
override fun onLivenessUpdate(dataModel: BaseResponseDataModel, image: Bitmap?) {
|
|
272
274
|
triggerEvent("onLivenessUpdate", dataModel)
|
|
273
275
|
runOnUiThread {
|
|
276
|
+
if(!isManual){
|
|
277
|
+
scanPassport.retryLiveness();
|
|
278
|
+
}
|
|
274
279
|
start = false;
|
|
275
280
|
showPopUpMessage(R.drawable.warning,"Please use your original physical ID card, not a photo or copy.","Let's try again",false)
|
|
276
281
|
}
|
|
@@ -345,9 +350,56 @@ class ScanPassportActivity : AppCompatActivity(),
|
|
|
345
350
|
|
|
346
351
|
|
|
347
352
|
|
|
353
|
+
}
|
|
354
|
+
|
|
355
|
+
// the liveness owns the message while it runs (not after "keep holding": the result is coming)
|
|
356
|
+
private var livenessActive = false
|
|
357
|
+
|
|
358
|
+
override fun onLivenessInstruction(instruction: PassportLivenessInstruction?, progress: Int) {
|
|
359
|
+
if (instruction == null) return
|
|
360
|
+
runOnUiThread {
|
|
361
|
+
livenessActive = instruction != PassportLivenessInstruction.KEEP_HOLDING
|
|
362
|
+
|
|
363
|
+
var text = when (instruction) {
|
|
364
|
+
// ---------- position / flat hold / light ----------
|
|
365
|
+
PassportLivenessInstruction.PLACE_DOCUMENT -> "Place the photo page\nin the frame"
|
|
366
|
+
PassportLivenessInstruction.KEEP_STEADY,
|
|
367
|
+
PassportLivenessInstruction.KEEP_FLAT,
|
|
368
|
+
PassportLivenessInstruction.ADJUST_POSITION,
|
|
369
|
+
PassportLivenessInstruction.DO_NOT_MOVE -> "Keep it steady"
|
|
370
|
+
// ---------- tilt ----------
|
|
371
|
+
PassportLivenessInstruction.LIFT_BOTTOM -> "Lift the bottom edge\ntoward you"
|
|
372
|
+
PassportLivenessInstruction.MOVE_A_LITTLE_MORE -> "A bit more\nand hold"
|
|
373
|
+
PassportLivenessInstruction.HOLD_THERE -> "Hold it there"
|
|
374
|
+
PassportLivenessInstruction.OTHER_SIDE -> "Lift the bottom edge,\nnot the top"
|
|
375
|
+
PassportLivenessInstruction.HOLD_IT_UP -> "Hold the passport\nin your hand"
|
|
376
|
+
PassportLivenessInstruction.PLACE_FLAT_AGAIN -> "Place it flat again"
|
|
377
|
+
// ---------- done ----------
|
|
378
|
+
PassportLivenessInstruction.KEEP_HOLDING -> "Keep holding\nAlmost done"
|
|
379
|
+
// ---------- pauses (the SDK continues by itself after a few seconds) ----------
|
|
380
|
+
PassportLivenessInstruction.HOLD_IN_HAND -> "Hold it in your hand\nnot on the table"
|
|
381
|
+
PassportLivenessInstruction.PHONE_TURNED -> "Keep the phone still\nTilt the passport"
|
|
382
|
+
PassportLivenessInstruction.TOO_BRIGHT -> "Too much light\nMove to the shade"
|
|
383
|
+
}
|
|
384
|
+
|
|
385
|
+
// the tilt progress (0..100), on its own line, only while the passport is being tilted
|
|
386
|
+
when (instruction) {
|
|
387
|
+
PassportLivenessInstruction.LIFT_BOTTOM,
|
|
388
|
+
PassportLivenessInstruction.MOVE_A_LITTLE_MORE,
|
|
389
|
+
PassportLivenessInstruction.HOLD_THERE,
|
|
390
|
+
PassportLivenessInstruction.OTHER_SIDE,
|
|
391
|
+
PassportLivenessInstruction.HOLD_IT_UP -> text += "\n$progress%"
|
|
392
|
+
else -> {}
|
|
393
|
+
}
|
|
394
|
+
|
|
395
|
+
infoLayout.visibility = View.VISIBLE
|
|
396
|
+
infoText.text = text
|
|
397
|
+
infoIcon.setImageDrawable(getResources().getDrawable(R.drawable.zoom_in))
|
|
398
|
+
}
|
|
348
399
|
}
|
|
349
400
|
|
|
350
401
|
override fun onEnvironmentalConditionsChange(brightnessEvents:BrightnessEvents, motion: MotionType,zoom: ZoomType, isCentered: Boolean,){
|
|
402
|
+
if (livenessActive) return
|
|
351
403
|
runOnUiThread {
|
|
352
404
|
if(start == false){
|
|
353
405
|
infoLayout.visibility = View.VISIBLE
|
|
@@ -309,58 +309,52 @@
|
|
|
309
309
|
android:layout_marginEnd="16dp"
|
|
310
310
|
android:layout_marginBottom="30dp"/>
|
|
311
311
|
|
|
312
|
-
|
|
313
|
-
<LinearLayout
|
|
312
|
+
<androidx.constraintlayout.widget.ConstraintLayout
|
|
314
313
|
android:id="@+id/backIDPage"
|
|
315
314
|
android:visibility="gone"
|
|
316
315
|
android:layout_width="match_parent"
|
|
317
316
|
android:layout_height="match_parent"
|
|
318
|
-
android:orientation="vertical"
|
|
319
|
-
android:paddingStart="24dp"
|
|
320
|
-
android:paddingEnd="24dp"
|
|
321
|
-
android:paddingTop="24dp"
|
|
322
|
-
android:paddingBottom="24dp"
|
|
323
317
|
android:background="@color/Green">
|
|
318
|
+
|
|
319
|
+
<!-- Always middle: constrained top-to-top of parent AND bottom-to-top of the button,
|
|
320
|
+
with wrap_content height. ConstraintLayout centers a wrap_content view between
|
|
321
|
+
two opposing constraints by default (bias 0.5), so this stays vertically centered
|
|
322
|
+
in whatever space is left above the button, on any screen height. -->
|
|
324
323
|
<LinearLayout
|
|
324
|
+
android:id="@+id/middleContent"
|
|
325
325
|
android:layout_width="match_parent"
|
|
326
|
-
android:layout_height="
|
|
327
|
-
android:layout_gravity="center_vertical"
|
|
328
|
-
android:layout_marginTop="00dp"
|
|
329
|
-
android:gravity="center"
|
|
326
|
+
android:layout_height="wrap_content"
|
|
330
327
|
android:orientation="vertical"
|
|
331
|
-
android:
|
|
332
|
-
android:
|
|
333
|
-
android:
|
|
334
|
-
android:
|
|
335
|
-
|
|
328
|
+
android:gravity="center_horizontal"
|
|
329
|
+
android:paddingStart="24dp"
|
|
330
|
+
android:paddingEnd="24dp"
|
|
331
|
+
android:paddingTop="24dp"
|
|
332
|
+
android:paddingBottom="24dp"
|
|
333
|
+
app:layout_constraintTop_toTopOf="parent"
|
|
334
|
+
app:layout_constraintBottom_toTopOf="@id/nextTemplate"
|
|
335
|
+
app:layout_constraintStart_toStartOf="parent"
|
|
336
|
+
app:layout_constraintEnd_toEndOf="parent">
|
|
336
337
|
|
|
337
338
|
<TextView
|
|
338
339
|
android:id="@+id/tvInstruction"
|
|
339
|
-
android:layout_width="
|
|
340
|
+
android:layout_width="match_parent"
|
|
340
341
|
android:layout_height="wrap_content"
|
|
341
|
-
android:paddingTop="120dp"
|
|
342
342
|
android:text="Please flip the card provided to take the back of the card"
|
|
343
343
|
android:textColor="@android:color/white"
|
|
344
344
|
android:textSize="20sp"
|
|
345
345
|
android:gravity="center"
|
|
346
|
-
android:textStyle="bold"
|
|
347
|
-
app:layout_constraintStart_toStartOf="parent"
|
|
348
|
-
app:layout_constraintEnd_toEndOf="parent"
|
|
349
|
-
tools:ignore="MissingConstraints" />
|
|
346
|
+
android:textStyle="bold" />
|
|
350
347
|
|
|
351
348
|
<ImageView
|
|
352
349
|
android:id="@+id/ivSample"
|
|
353
350
|
android:layout_width="wrap_content"
|
|
351
|
+
android:layout_height="wrap_content"
|
|
352
|
+
android:layout_marginTop="40dp"
|
|
354
353
|
android:layout_margin="10dp"
|
|
355
354
|
android:padding="10dp"
|
|
356
|
-
android:layout_height="wrap_content"
|
|
357
|
-
android:paddingTop="100dp"
|
|
358
355
|
android:contentDescription="@string/app_name"
|
|
359
356
|
android:scaleType="fitXY"
|
|
360
|
-
android:layout_gravity="center"
|
|
361
|
-
app:layout_constraintTop_toBottomOf="@id/tvInstruction"
|
|
362
|
-
app:layout_constraintStart_toStartOf="parent"
|
|
363
|
-
app:layout_constraintEnd_toEndOf="parent" />
|
|
357
|
+
android:layout_gravity="center" />
|
|
364
358
|
|
|
365
359
|
<!-- Caption -->
|
|
366
360
|
<TextView
|
|
@@ -371,43 +365,37 @@
|
|
|
371
365
|
android:layout_marginTop="15dp"
|
|
372
366
|
android:text="Expected Card Type"
|
|
373
367
|
android:textColor="@color/white"
|
|
374
|
-
android:textSize="12sp"
|
|
375
|
-
app:layout_constraintTop_toBottomOf="@id/ivSample"
|
|
376
|
-
app:layout_constraintStart_toStartOf="parent"
|
|
377
|
-
app:layout_constraintEnd_toEndOf="parent" />
|
|
368
|
+
android:textSize="12sp" />
|
|
378
369
|
|
|
379
370
|
<pl.droidsonroids.gif.GifImageView
|
|
380
371
|
android:id="@+id/gifCard"
|
|
381
|
-
android:visibility="visible"
|
|
382
|
-
app:layout_constraintTop_toBottomOf="@id/tvCaption"
|
|
383
372
|
android:layout_width="150dp"
|
|
384
373
|
android:layout_height="150dp"
|
|
385
|
-
android:background="@null"
|
|
386
|
-
android:src="@drawable/card"
|
|
387
|
-
tools:ignore="MissingConstraints" />
|
|
388
|
-
|
|
389
|
-
<Button
|
|
390
|
-
android:id="@+id/nextTemplate"
|
|
391
|
-
android:layout_width="match_parent"
|
|
392
|
-
android:layout_height="56dp"
|
|
393
|
-
android:text="Next"
|
|
394
|
-
android:textAllCaps="false"
|
|
395
|
-
android:textColor="@android:color/white"
|
|
396
|
-
app:cornerRadius="30dp"
|
|
397
|
-
app:layout_constraintStart_toStartOf="parent"
|
|
398
|
-
app:layout_constraintEnd_toEndOf="parent"
|
|
399
|
-
app:layout_constraintBottom_toBottomOf="parent"
|
|
400
|
-
android:layout_marginStart="10dp"
|
|
401
|
-
android:layout_marginEnd="10dp"
|
|
402
374
|
android:layout_marginTop="15dp"
|
|
403
|
-
android:
|
|
375
|
+
android:layout_gravity="center"
|
|
376
|
+
android:background="@null"
|
|
377
|
+
android:src="@drawable/card" />
|
|
404
378
|
|
|
405
379
|
</LinearLayout>
|
|
406
380
|
|
|
407
|
-
|
|
408
|
-
|
|
409
|
-
|
|
410
|
-
|
|
411
|
-
|
|
381
|
+
<!-- Fixed bottom bar. Pinned directly to the parent ConstraintLayout's bottom edge,
|
|
382
|
+
so its position never depends on the content above — it is always laid out
|
|
383
|
+
and always clickable, no matter the screen height. -->
|
|
384
|
+
<Button
|
|
385
|
+
android:id="@+id/nextTemplate"
|
|
386
|
+
android:layout_width="match_parent"
|
|
387
|
+
android:layout_height="56dp"
|
|
388
|
+
android:text="Next"
|
|
389
|
+
android:textAllCaps="false"
|
|
390
|
+
android:textColor="@android:color/white"
|
|
391
|
+
app:cornerRadius="30dp"
|
|
392
|
+
android:layout_marginStart="30dp"
|
|
393
|
+
android:layout_marginEnd="30dp"
|
|
394
|
+
android:layout_marginBottom="10dp"
|
|
395
|
+
app:layout_constraintStart_toStartOf="parent"
|
|
396
|
+
app:layout_constraintEnd_toEndOf="parent"
|
|
397
|
+
app:layout_constraintBottom_toBottomOf="parent" />
|
|
398
|
+
|
|
399
|
+
</androidx.constraintlayout.widget.ConstraintLayout>
|
|
412
400
|
|
|
413
401
|
</androidx.constraintlayout.widget.ConstraintLayout>
|
|
@@ -5,6 +5,7 @@
|
|
|
5
5
|
|
|
6
6
|
RCT_EXTERN_METHOD(initialize: (NSString *)apiKey
|
|
7
7
|
configFileName:(NSString *)configFileName
|
|
8
|
+
processJsonConfigFile:(NSString *)processJsonConfigFile
|
|
8
9
|
performLivenessFace:(BOOL *)performLivenessFace
|
|
9
10
|
ENV_CustomColor:(NSString *)ENV_CustomColor
|
|
10
11
|
enableDetect:(BOOL *)enableDetect
|
|
@@ -24,6 +25,7 @@ RCT_EXTERN_METHOD(initialize: (NSString *)apiKey
|
|
|
24
25
|
minCPUCores:(nonnull NSNumber * )minCPUCores
|
|
25
26
|
manualClickColor:(NSString * )manualClickColor
|
|
26
27
|
countDownNumbersColor:(NSString * )countDownNumbersColor
|
|
28
|
+
flowUiLanguage:(NSString * )flowUiLanguage
|
|
27
29
|
)
|
|
28
30
|
RCT_EXTERN_METHOD(startScanPassport:
|
|
29
31
|
(NSString *)language
|
|
@@ -68,10 +70,25 @@ RCT_EXTERN_METHOD(startFlow:(NSString *)logoUrl
|
|
|
68
70
|
holdUntilClickColors:(nonnull NSNumber *)holdUntilClickColors
|
|
69
71
|
backgroundType:(NSString *)backgroundType
|
|
70
72
|
clear:(BOOL)clear
|
|
71
|
-
|
|
73
|
+
extractedDataLanguage:(NSString *)extractedDataLanguage
|
|
72
74
|
enableNfc:(BOOL)enableNfc
|
|
73
75
|
enableQr:(BOOL)enableQr
|
|
74
|
-
blockLoaderCustomProperties:(NSString *)blockLoaderCustomProperties
|
|
76
|
+
blockLoaderCustomProperties:(NSString *)blockLoaderCustomProperties
|
|
77
|
+
stepperType:(NSString *)stepperType
|
|
78
|
+
rangeStart:(NSNumber *)rangeStart
|
|
79
|
+
rangeEnd:(NSNumber *)rangeEnd
|
|
80
|
+
stepperTitle:(NSString *)stepperTitle
|
|
81
|
+
showCountDown:(BOOL)showCountDown
|
|
82
|
+
validationStyle:(NSString *)validationStyle
|
|
83
|
+
stepperTitleColor:(NSString *)stepperTitleColor
|
|
84
|
+
howToCapturePassportVideo:(NSString *)howToCapturePassportVideo
|
|
85
|
+
howToCaptureIDVideo:(NSString *)howToCaptureIDVideo
|
|
86
|
+
howToCaptureFaceVideo:(NSString *)howToCaptureFaceVideo
|
|
87
|
+
clickFontWeight:(NSString *)clickFontWeight
|
|
88
|
+
hideBlockLoader:(BOOL)hideBlockLoader
|
|
89
|
+
hideWrapUp:(BOOL)hideWrapUp
|
|
90
|
+
localMrzScan:(BOOL)localMrzScan
|
|
91
|
+
faceAcceptanceRate:(NSNumber *)faceAcceptanceRate)
|
|
75
92
|
|
|
76
93
|
|
|
77
94
|
RCT_EXTERN_METHOD(supportedEvents)
|