Skip to content

Commit

Permalink
Final commit for 4.1.0
Browse files Browse the repository at this point in the history
  • Loading branch information
JumioMobileTeam committed Apr 7, 2022
1 parent 0031bb0 commit e218f4e
Show file tree
Hide file tree
Showing 55 changed files with 1,572 additions and 152 deletions.
4 changes: 4 additions & 0 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
@@ -1,3 +1,7 @@
## 4.1.0
* Updated Jumio SDK Android and iOS to 4.1.0
* Update dependencies to Flutter 2.10.3 and Dart 2.16.1

## 4.0.0
* Updated Jumio SDK Android and iOS to 4.0.0
* Update dependencies to Flutter 2.5.3 and Dart 2.14.4
Expand Down
19 changes: 15 additions & 4 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@

Official Jumio Mobile SDK plugin for Flutter

This plugin is compatible with version 4.0.0 of the Jumio SDK. If you have questions, please reach out to your Account Manager or contact [Jumio Support](#support).
This plugin is compatible with version 4.1.0 of the Jumio SDK. If you have questions, please reach out to your Account Manager or contact [Jumio Support](#support).

# Table of Contents
- [Compatibility](#compatibility)
Expand All @@ -12,6 +12,7 @@ This plugin is compatible with version 4.0.0 of the Jumio SDK. If you have quest
- [Android](#android)
- [Usage](#usage)
- [Retrieving Information](#retrieving-information)
- [Customization](#customization)
- [Callbacks](#callbacks)
- [Result Objects](#result-objects)
- [FAQ](#faq)
Expand All @@ -22,7 +23,7 @@ This plugin is compatible with version 4.0.0 of the Jumio SDK. If you have quest
- [Support](#support)

## Compatibility
Compatibility has been tested with a Flutter version of 2.5.3 and Dart 2.14.4
Compatibility has been tested with a Flutter version of 2.10.3 and Dart 2.16.1

## Setup
Create Flutter project and add the Jumio Mobile SDK module to it.
Expand All @@ -38,7 +39,7 @@ dependencies:
flutter:
sdk: flutter

jumio_mobile_sdk_flutter: ^4.0.0
jumio_mobile_sdk_flutter: ^4.1.0
```
And install the dependency:
Expand Down Expand Up @@ -74,7 +75,7 @@ Make sure your compileSdkVersion, minSdkVersion and buildToolsVersion are high e
android {
minSdkVersion 21
compileSdkVersion 31
buildToolsVersion "31.0.0"
buildToolsVersion "32.0.0"
...
}
```
Expand Down Expand Up @@ -112,6 +113,12 @@ Modify the Gradle Wrapper version in android/gradle.properties.
***Proguard Rules***
For information on Android Proguard Rules concerning the Jumio SDK, please refer to our [Android guides](https://github.com/Jumio/mobile-sdk-android#proguard).

To enable analytic feedback and internal diagnostics, please make sure to include the line
```
-keep class io.flutter.embedding.android.FlutterActivity
```
to your Proguard Rules.

## Usage

1. Import "**jumiomobilesdk.dart**"
Expand All @@ -138,6 +145,10 @@ Jumio.start();
### Retrieving information
Scan results are returned from the startXXX() methods asynchronously. Await the returned values to get the results. Exceptions are thrown issues such as invalid credentials, missing API keys, permissions errors and such.

## Customization
### Android
The JumioSDK colors can be customized by overriding the custom theme `AppThemeCustomJumio`. An example customization of all values that can be found in the [styles.xml of the DemoApp](example/android/app/src/main/res/values/styles.xml)

## Callbacks
In oder to get information about result fields, Retrieval API, Delete API, global settings and more, please read our [page with server related information](https://github.com/Jumio/implementation-guides/blob/master/api-guide/api_guide.md#callback).

Expand Down
15 changes: 13 additions & 2 deletions android/build.gradle
Original file line number Diff line number Diff line change
Expand Up @@ -18,7 +18,17 @@ buildscript {
rootProject.allprojects {
repositories {
google()
maven { url 'https://mobile-sdk.jumio.com' }
exclusiveContent {
forRepository {
maven {
url 'https://mobile-sdk.jumio.com'
}
}
filter {
includeGroup "com.jumio.android"
includeGroup "com.iproov.sdk"
}
}
}
}

Expand All @@ -41,7 +51,7 @@ android {
}

ext {
SDK_VERSION = "4.0.0"
SDK_VERSION = "4.1.0"
}

dependencies {
Expand All @@ -54,6 +64,7 @@ dependencies {
implementation "com.jumio.android:barcode-mlkit:${SDK_VERSION}"
implementation "com.jumio.android:iproov:${SDK_VERSION}"
implementation "com.jumio.android:defaultui:${SDK_VERSION}"
implementation "com.jumio.android:datadog:${SDK_VERSION}"

//only for the sample code
implementation "androidx.activity:activity-ktx:1.4.0"
Expand Down
78 changes: 42 additions & 36 deletions android/src/main/kotlin/com/jumio/jumiomobilesdk/JumioModule.kt
Original file line number Diff line number Diff line change
Expand Up @@ -2,8 +2,8 @@ package com.jumio.jumiomobilesdk

import android.content.Intent
import com.jumio.defaultui.JumioActivity
import com.jumio.sdk.result.JumioFaceResult
import com.jumio.sdk.result.JumioIDResult
import com.jumio.sdk.credentials.JumioCredentialCategory.FACE
import com.jumio.sdk.credentials.JumioCredentialCategory.ID
import com.jumio.sdk.result.JumioResult
import io.flutter.plugin.common.MethodCall

Expand Down Expand Up @@ -66,7 +66,7 @@ class JumioModule : ModuleBase() {
putExtra(JumioActivity.EXTRA_DATACENTER, dataCenter)

//The following intent extra can be used to customize the Theme of Default UI
//putExtra(JumioActivity.EXTRA_CUSTOM_THEME, R.style.AppThemeCustomJumio)
putExtra(JumioActivity.EXTRA_CUSTOM_THEME, R.style.AppThemeCustomJumio)
}
hostActivity.startActivityForResult(intent, REQUEST_CODE)

Expand All @@ -88,44 +88,50 @@ class JumioModule : ModuleBase() {

credentialInfoList?.let {
credentialInfoList.forEach {
val jumioCredentialResult = jumioResult.getResult(it)

val eventResultMap = mutableMapOf<String, Any?>(
"credentialCategory" to it.category.toString(),
"credentialId" to it.id,
)

if (jumioCredentialResult is JumioIDResult) {
eventResultMap.putAll(
mapOf(
"selectedCountry" to jumioCredentialResult.country,
"selectedDocumentType" to jumioCredentialResult.idType,
"idNumber" to jumioCredentialResult.documentNumber,
"personalNumber" to jumioCredentialResult.personalNumber,
"issuingDate" to jumioCredentialResult.issuingDate,
"expiryDate" to jumioCredentialResult.expiryDate,
"issuingCountry" to jumioCredentialResult.issuingCountry,
"lastName" to jumioCredentialResult.lastName,
"firstName" to jumioCredentialResult.firstName,
"gender" to jumioCredentialResult.gender,
"nationality" to jumioCredentialResult.nationality,
"dateOfBirth" to jumioCredentialResult.dateOfBirth,
"addressLine" to jumioCredentialResult.address,
"city" to jumioCredentialResult.city,
"subdivision" to jumioCredentialResult.subdivision,
"postCode" to jumioCredentialResult.postalCode,
"placeOfBirth" to jumioCredentialResult.placeOfBirth,
"mrzLine1" to jumioCredentialResult.mrzLine1,
"mrzLine2" to jumioCredentialResult.mrzLine2,
"mrzLine3" to jumioCredentialResult.mrzLine3,
).compact()
)
} else if (jumioCredentialResult is JumioFaceResult) {
eventResultMap.putAll(
mapOf(
"passed" to jumioCredentialResult.passed.toString(),
).compact()
)
if (it.category == ID) {
val idResult = jumioResult.getIDResult(it)

idResult?.let {
eventResultMap.putAll(
mapOf(
"selectedCountry" to idResult.country,
"selectedDocumentType" to idResult.idType,
"idNumber" to idResult.documentNumber,
"personalNumber" to idResult.personalNumber,
"issuingDate" to idResult.issuingDate,
"expiryDate" to idResult.expiryDate,
"issuingCountry" to idResult.issuingCountry,
"lastName" to idResult.lastName,
"firstName" to idResult.firstName,
"gender" to idResult.gender,
"nationality" to idResult.nationality,
"dateOfBirth" to idResult.dateOfBirth,
"addressLine" to idResult.address,
"city" to idResult.city,
"subdivision" to idResult.subdivision,
"postCode" to idResult.postalCode,
"placeOfBirth" to idResult.placeOfBirth,
"mrzLine1" to idResult.mrzLine1,
"mrzLine2" to idResult.mrzLine2,
"mrzLine3" to idResult.mrzLine3,
).compact()
)
}
} else if (it.category == FACE) {
val faceResult = jumioResult.getFaceResult(it)

faceResult?.let {
eventResultMap.putAll(
mapOf(
"passed" to faceResult.passed.toString(),
).compact()
)
}
}
credentialArray.add(eventResultMap)
}
Expand Down
6 changes: 6 additions & 0 deletions android/src/main/res/values/styles.xml
Original file line number Diff line number Diff line change
@@ -0,0 +1,6 @@
<resources>
<!--Base application theme-->
<style name="AppThemeCustomJumio" parent="Theme.Jumio">
<!--Custom theme definition that can be overridden outside-->
</style>
</resources>
7 changes: 6 additions & 1 deletion example/android/app/src/main/AndroidManifest.xml
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,7 @@
additional functionality it is fine to subclass or reimplement
FlutterApplication and put your custom class here. -->
<application
android:name="io.flutter.app.FlutterApplication"
android:name="${applicationName}"
android:label="jumiomobilesdk_example"
android:icon="@mipmap/ic_launcher">
<activity
Expand All @@ -25,6 +25,11 @@
android:name="io.flutter.embedding.android.NormalTheme"
android:resource="@style/NormalTheme"
/>

<meta-data
android:name="flutterEmbedding"
android:value="2" />

<!-- Displays an Android View that continues showing the launch screen
Drawable until Flutter paints its first frame, then this splash
screen fades out. A splash screen is useful to avoid any visual
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -2,5 +2,4 @@ package com.jumio.jumiomobilesdk_example

import io.flutter.embedding.android.FlutterActivity

class MainActivity: FlutterActivity() {
}
class MainActivity: FlutterActivity()
86 changes: 86 additions & 0 deletions example/android/app/src/main/res/values/styles.xml
Original file line number Diff line number Diff line change
Expand Up @@ -15,4 +15,90 @@
<style name="NormalTheme" parent="@android:style/Theme.Black.NoTitleBar">
<item name="android:windowBackground">@android:color/white</item>
</style>

<!-- Base application theme. -->
<style name="AppThemeCustomJumio" parent="Theme.Jumio">
<!-- <item name="colorPrimary">#F2F233</item>-->
<!-- <item name="jumio_background">#fffee0</item>-->
<!-- <item name="jumio_text_foreground">#1361BD</item>-->
<!-- <item name="jumio_navigation_icon">#EC407A</item>-->

<!-- <item name="jumio_bubble_background">#bc2e41</item>-->
<!-- <item name="jumio_bubble_background_selected">#57ffc7</item>-->
<!-- <item name="jumio_bubble_foreground">#FF5722</item>-->

<!-- <item name="jumio_primary_button_background">#F2F233</item>-->
<!-- <item name="jumio_primary_button_background_pressed">#00B0FF</item>-->
<!-- <item name="jumio_primary_button_background_disabled">#92C039</item>-->
<!-- <item name="jumio_primary_button_foreground">#000000</item>-->
<!-- <item name="jumio_secondary_button_background">#9Edd9E</item>-->
<!-- <item name="jumio_secondary_button_background_pressed">#D900ff00</item>-->
<!-- <item name="jumio_secondary_button_background_disabled">#E35252</item>-->
<!-- <item name="jumio_secondary_button_foreground">#044071</item>-->

<!-- <item name="jumio_circle_item_background">#00B0FF</item>-->
<!-- <item name="jumio_circle_item_foreground">#E0E011</item>-->

<!-- <item name="jumio_selection_icon_foreground">#123cff</item>-->

<!-- <item name="jumio_search_bubble_background">#AC3D9A</item>-->
<!-- <item name="jumio_search_bubble_foreground">#E35252</item>-->

<!-- <item name="jumio_scanview_foreground">#FF5722</item>-->
<!-- <item name="jumio_scanview_bubble_background">#9A31BDBD</item>-->
<!-- <item name="jumio_scanview_bubble_foreground">#FF5722</item>-->
<!-- <item name="jumio_scanview_animation_background">#3E1AA1AD</item>-->

<!-- <item name="jumio_scanview_shutter">#AC3D9A</item>-->
<!-- <item name="jumio_scanview_shutter_pressed">#E0E011</item>-->

<!-- <item name="jumio_loading_circle_plain">#FFCA28</item>-->
<!-- <item name="jumio_loading_circle_gradient_start">#04A7F3</item>-->
<!-- <item name="jumio_loading_circle_gradient_end">#033598</item>-->
<!-- <item name="jumio_error_circle_gradient_start">#AC3D9A</item>-->
<!-- <item name="jumio_error_circle_gradient_end">#C31322</item>-->
<!-- <item name="jumio_loading_circle_icon">#050202</item>-->

<!-- &lt;!&ndash; scan-overlay, iproov & nfc colors &ndash;&gt;-->
<!-- <item name="jumio_overlay_customization">@style/CustomOverlay</item>-->
<!-- <item name="iproov_customization">@style/CustomIproov</item>-->
<!-- <item name="nfc_customization">@style/CustomNfc</item>-->
<!-- </style>-->

<!-- <style name="CustomOverlay" parent="Jumio.Overlay.Customization">-->
<!-- <item name="jumio_scanOverlay">#FF5722</item>-->
<!-- <item name="jumio_scanOverlayFill">#60EDED3B</item>-->
<!-- <item name="jumio_scanOverlayTransparent">#ff0000ff</item>-->
<!-- <item name="jumio_scanBackground">#ff0000ff</item>-->
<!-- </style>-->

<!-- <style name="CustomNfc" parent="Nfc.Customization">-->
<!-- <item name="nfc_passport_cover">#3032b4</item>-->
<!-- <item name="nfc_passport_page_dark">#0558ff</item>-->
<!-- <item name="nfc_passport_page_light">#31bce1</item>-->
<!-- <item name="nfc_passport_foreground">#FFFFFF</item>-->
<!-- <item name="nfc_phone_background">#000000</item>-->
<!-- </style>-->

<!-- <style name="CustomIproov" parent="Iproov.Customization">-->
<!-- &lt;!&ndash;Help screen colors&ndash;&gt;-->
<!-- <item name="iproov_animation_foreground">#FF5722</item>-->
<!-- <item name="iproov_animation_background">#B6FFFFFF</item>-->
<!-- &lt;!&ndash;Iproov scan colors&ndash;&gt;-->
<!-- <item name="iproov_backgroundColor">#B6FFFFFF</item>-->
<!-- <item name="iproov_lineColor">#3032b4</item>-->
<!-- <item name="iproov_headerTextColor">#FF5722</item>-->
<!-- <item name="iproov_headerBackgroundColor">#31bce1</item>-->
<!-- //Android black with alpha-->
<!-- <item name="iproov_footerTextColor">#ff0000ff</item>-->
<!-- <item name="iproov_footerBackgroundColor">#ffff00</item>-->
<!-- //Android black with alpha-->
<!-- <item name="iproov_livenessAssurance_primaryTintColor">#ff55a1</item>-->
<!-- <item name="iproov_livenessAssurance_secondaryTintColor">#CC0000</item>-->
<!-- &lt;!&ndash;GPA specific colors&ndash;&gt;-->
<!-- <item name="iproov_genuinePresenceAssurance_progressBarColor">#000000</item>-->
<!-- //Android black with alpha-->
<!-- <item name="iproov_genuinePresenceAssurance_notReadyTintColor">#42e242</item>-->
<!-- <item name="iproov_genuinePresenceAssurance_readyTintColor">#CffCCC</item>-->
</style>
</resources>
2 changes: 1 addition & 1 deletion example/ios/Flutter/AppFrameworkInfo.plist
Original file line number Diff line number Diff line change
Expand Up @@ -21,6 +21,6 @@
<key>CFBundleVersion</key>
<string>1.0</string>
<key>MinimumOSVersion</key>
<string>8.0</string>
<string>9.0</string>
</dict>
</plist>
22 changes: 11 additions & 11 deletions example/ios/Podfile.lock
Original file line number Diff line number Diff line change
@@ -1,15 +1,15 @@
PODS:
- Flutter (1.0.0)
- iProov (9.1.0):
- iProov (9.2.0):
- Socket.IO-Client-Swift (~> 16.0)
- Jumio (4.0.0):
- Jumio/Liveness (= 4.0.0)
- Jumio/Liveness (4.0.0):
- iProov (= 9.1.0)
- Jumio (4.1.0):
- Jumio/Liveness (= 4.1.0)
- Jumio/Liveness (4.1.0):
- iProov (= 9.2.0)
- PPpdf417 (= 8.0.0)
- jumio_mobile_sdk_flutter (4.0.0):
- jumio_mobile_sdk_flutter (4.1.0):
- Flutter
- Jumio (= 4.0.0)
- Jumio (= 4.1.0)
- PPpdf417 (8.0.0)
- Socket.IO-Client-Swift (16.0.1):
- Starscream (~> 4.0)
Expand All @@ -35,13 +35,13 @@ EXTERNAL SOURCES:

SPEC CHECKSUMS:
Flutter: 50d75fe2f02b26cc09d224853bb45737f8b3214a
iProov: aa2bf3acd526d9545c649e3de1a3bf2ee535c4dc
Jumio: 62f19c7bbf73e4fb7ec2d8d919144ac6e819b818
jumio_mobile_sdk_flutter: 0ce25aa26c6f44e67ae8f11a11b595a74f7830be
iProov: a01ee99a605be036375504e3c684fe87a9ede31c
Jumio: 5ba2538df84aeb1cdcc630c6f3333a2fb6c9c066
jumio_mobile_sdk_flutter: 80fd56eb191abb43a57864f05195be2f5b1c5fc5
PPpdf417: aa644766d51a7e00b8d41c70868bba8b818f5215
Socket.IO-Client-Swift: c116d6dc9fd6be9c259bacfe143f8725bce7d79e
Starscream: 5178aed56b316f13fa3bc55694e583d35dd414d9

PODFILE CHECKSUM: c2211d48fe939fa71291b59548e1ffc6726497b1

COCOAPODS: 1.11.2
COCOAPODS: 1.11.3
Loading

0 comments on commit e218f4e

Please sign in to comment.