Plugin for Flutter

Official Jumio Mobile SDK plugin for Flutter

This plugin is compatible with version 4.2.0 of the Jumio SDK. If you have questions, please reach out to your Account Manager or contact Jumio Support.

Table of Contents

Compatibility

Compatibility has been tested with a Flutter version of 3.0.1 and Dart 2.17.1

Setup

Create Flutter project and add the Jumio Mobile SDK module to it.

flutter create MyProject

Add the Jumio Mobile SDK as a dependency to your pubspec.yaml file:

dependencies:
  flutter:
    sdk: flutter

  jumio_mobile_sdk_flutter: ^4.2.0

And install the dependency:

cd MyProject
flutter pub get

Integration

iOS

  1. Add the "NSCameraUsageDescription"-key to your Info.plist file.
  2. Your app's deployment target must be at least iOS 11.0

Android

AndroidManifest
Open your AndroidManifest.xml file and change allowBackup to false. Add user permission HIGH_SAMPLING_RATE_SENSORS to access sensor data with a sampling rate greater than 200 Hz.

<application
...
android:allowBackup="false">
</application>
...
<uses-permission android:name="android.permission.HIGH_SAMPLING_RATE_SENSORS"/>

Make sure your compileSdkVersion, minSdkVersion and buildToolsVersion are high enough.

android {
  minSdkVersion 21
  compileSdkVersion 31
  buildToolsVersion "32.0.0"
  ...
}

Enable MultiDex
Follow the Android developers guide: https://developer.android.com/studio/build/multidex.html

android {
  ...
  defaultConfig {
    ...
    multiDexEnabled true
  }
}

Upgrade Gradle build tools
The plugin requires at least version 4.0.0 of the Android build tools. This transitively requires and upgrade of the Gradle wrapper to version 7 and an update to Java 11.

Upgrade build tools version to 7.2.0 in android/build.gradle:

buildscript {
  ...
  dependencies {
    ...
    classpath 'com.android.tools.build:gradle:7.2.0'
  }
}

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.

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"
import 'package:jumio_mobile_sdk_flutter/jumio_mobile_sdk_flutter.dart';
  1. The SDKs can be initialized with the following call:
Jumio.init("AUTHORIZATION_TOKEN", "DATACENTER");

Datacenter can either be US, EU or SG.
For more information about how to obtain an AUTHORIZATION_TOKEN, please refer to our API Guide.

  1. As soon as the SDK is initialized, the SDK is started by the following call.
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

JumioSDK Android appearance 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.

iOS

JumioSDK iOS appearance can be customized to your respective needs. You can customize each color based on the device's set appearance, for either Dark mode or Light mode, or you can set a single color for both appearances. Customization is optional and not required.

You can pass the following customization options at Jumio.start:

Customization key
iProovLineColor
iProovHeaderTextColor
iProovHeaderBackgroundColor
iProovPromptTextColor
iProovFooterBackgroundColor
iProovCloseButtonTintColor
iProovLivenessAssurancePrimaryTintColor
iProovLivenessAssuranceSecondaryTintColor
iProovGenuinePresenceAssuranceProgressBarColor
iProovGenuinePresenceAssuranceNotReadyTintColor
iProovGenuinePresenceAssuranceReadyTintColor
iProovAnimationForeground
iProovAnimationBackground
iProovFloatingPromptEnabled
primaryButtonBackground
primaryButtonBackgroundPressed
primaryButtonBackgroundDisabled
primaryButtonText
secondaryButtonBackground
secondaryButtonBackgroundPressed
secondaryButtonBackgroundDisabled
secondaryButtonText
bubbleBackground
bubbleForeground
bubbleBackgroundSelected
bubbleCircleItemForeground
bubbleCircleItemBackground
bubbleSelectionIconForeground
loadingCirclePlain
loadingCircleGradientStart
loadingCircleGradientEnd
loadingErrorCircleGradientStart
loadingErrorCircleGradientEnd
loadingCircleIcon
scanOverlay
scanOverlayFill
scanOverlayTransparent
scanOverlayBackground
nfcPassportCover
nfcPassportPageDark
nfcPassportPageLight
nfcPassportForeground
nfcPhoneCover
scanViewBubbleForeground
scanViewBubbleBackground
scanViewForeground
scanViewAnimationBackground
scanViewAnimationShutter
searchBubbleBackground
searchBubbleForeground
searchBubbleListItemSelected
navigationIconColor
textForegroundColor
primaryColor

All colors are provided with a HEX string with the following formats: #ff00ff or #66ff00ff if you want to set the alpha level.

Customization example

Example for setting color based on Dark or Light mode

Jumio.start({
    "primaryColor": { light:"ffffff", dark:"000000" }
    "primaryButtonBackground": { light:ffffff, dark:"000000" }
});

Example for setting same color for both Dark and Light mode

Jumio.start({
    "primaryColor": "ffffff"
    "primaryButtonBackground": "ffffff"
});

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.

Result Objects

JumioSDK will return EventResult in case of a successfully completed workflow and EventError in case of error. EventError includes an error code and an error message.

EventResult

ParameterTypeMax. lengthDescription
selectedCountryString3ISO 3166-1 alpha-3 country code as provided or selected
selectedDocumentTypeString16PASSPORT, DRIVER_LICENSE, IDENTITY_CARD or VISA
idNumberString100Identification number of the document
personalNumberString14Personal number of the document
issuingDateDateDate of issue
expiryDateDateDate of expiry
issuingCountryString3Country of issue as (ISO 3166-1 alpha-3) country code
lastNameString100Last name of the customer
firstNameString100First name of the customer
dobDateDate of birth
genderString1m, f or x
originatingCountryString3Country of origin as (ISO 3166-1 alpha-3) country code
addressLineString64Street name
cityString64City
subdivisionString3Last three characters of ISO 3166-2:US state code
postCodeString15Postal code
mrzDataMRZ-DATAMRZ data, see table below
optionalData1String50Optional field of MRZ line 1
optionalData2String50Optional field of MRZ line 2
placeOfBirthString255Place of Birth

MRZ-Data

ParameterTypeMax. lengthDescription
formatString8MRP, TD1, TD2, CNIS, MRVA, MRVB or UNKNOWN
line1String50MRZ line 1
line2String50MRZ line 2
line3String50MRZ line 3
idNumberValidBOOLTrue if ID number check digit is valid, otherwise false
dobValidBOOLTrue if date of birth check digit is valid, otherwise false
expiryDateValidBOOLTrue if date of expiry check digit is valid or not available, otherwise false
personalNumberValidBOOLTrue if personal number check digit is valid or not available, otherwise false
compositeValidBOOLTrue if composite check digit is valid, otherwise false

FAQ

App Crash at Launch for iOS

If iOS application crashes immediately after launch and without additional information, but works fine for Android, please make sure to the following lines have been added to your podfile:

post_install do |installer|
    installer.pods_project.targets.each do |target|
      target.build_configurations.each do |config|
          config.build_settings['BUILD_LIBRARY_FOR_DISTRIBUTION'] = 'YES'
      end
    end
end

Please refer to iOS guide for more details.

iOS Localization

After installing Cocoapods, please localize your iOS application using the languages provided at the following path:
ios -> Pods -> Jumio -> Localizations -> xx.lproj

Localization

iProov String Keys

Please note that as of 3.8.0. the following keys have been added to the SDK:

  • "IProov_IntroFlash"
  • "IProov_IntroLa"
  • "IProov_PromptLivenessAlignFace"
  • "IProov_PromptLivenessNoTarget"
  • "IProov_PromptLivenessScanCompleted"
  • "IProov_PromptTooClose"
  • "IProov_PromptTooFar"

Make sure your podfile is up to date and that new pod versions are installed properly so your Localizable files include new strings. For more information, please refer to our Changelog and Transition Guide.

Empty Country List for Android Release Build

If country list is empty for the Android release build, please make sure your app has the proper internet permissions. Without a working network connection, countries won't load in and the list will stay empty.

If necessary, please add android.permission.INTERNET permission to your AndroidManifest.xml file.

The standard Flutter template will not include this tag automatically, but still allows Internet access during development to enable communication between Flutter tools and a running app. For more information, please refer to the official Flutter documentation.

Support

Contact

If you have any questions regarding our implementation guide please contact Jumio Customer Service at support@jumio.com or https://support.jumio.com. The Jumio online helpdesk contains a wealth of information regarding our service including demo videos, product descriptions, FAQs and other things that may help to get you started with Jumio. Check it out at: https://support.jumio.com.

Licenses

The software contains third-party open source software. For more information, please see Android licenses and iOS licenses

This software is based in part on the work of the Independent JPEG Group.

Copyright

© Jumio Corp. 268 Lambert Avenue, Palo Alto, CA 94306

The source code and software available on this website (“Software”) is provided by Jumio Corp. or its affiliated group companies (“Jumio”) "as is” and any express or implied warranties, including, but not limited to, the implied warranties of merchantability and fitness for a particular purpose are disclaimed. In no event shall Jumio be liable for any direct, indirect, incidental, special, exemplary, or consequential damages (including but not limited to procurement of substitute goods or services, loss of use, data, profits, or business interruption) however caused and on any theory of liability, whether in contract, strict liability, or tort (including negligence or otherwise) arising in any way out of the use of this Software, even if advised of the possibility of such damage. In any case, your use of this Software is subject to the terms and conditions that apply to your contractual relationship with Jumio. As regards Jumio’s privacy practices, please see our privacy notice available here: Privacy Policy.

Libraries

jumio_mobile_sdk_flutter