Skip to content

Commit

Permalink
Final commit for 3.5.0
Browse files Browse the repository at this point in the history
  • Loading branch information
JumioMobileTeam committed Feb 25, 2020
1 parent 317e12f commit d40926c
Show file tree
Hide file tree
Showing 34 changed files with 510 additions and 166 deletions.
31 changes: 15 additions & 16 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -2,13 +2,13 @@

Official Jumio Mobile SDK plugin for Apache Cordova

This plugin is compatible with version 3.4.1 of the Jumio SDK. If you have questions, please reach out to your Account Manager or contact Jumio Support at support@jumio.com or https://support.jumio.com
This plugin is compatible with version 3.5.0 of the Jumio SDK. If you have questions, please reach out to your Account Manager or contact Jumio Support at support@jumio.com or https://support.jumio.com

## Compatibility
With this release, we only ensure compatibility with the latest Cordova versions and plugins.
At the time of this release, the following minimum versions are supported:
* Cordova: 9.0.0
* Cordova Android: 8.0.0
* Cordova Android: 8.1.0
* Cordova iOS: 5.0.1

## Setup
Expand All @@ -19,7 +19,7 @@ cordova create MyProject com.my.project "MyProject"
cd MyProject
cordova platform add ios
cordova platform add android
cordova plugin add https://github.com/Jumio/mobile-cordova.git#v3.4.1
cordova plugin add https://github.com/Jumio/mobile-cordova.git#v3.5.0
```

## Integration
Expand All @@ -43,17 +43,17 @@ Add a parameter for your SDK_VERSION into the ext-section:

```
ext {
SDK_VERSION = "3.4.1"
SDK_VERSION = "3.5.0"
}
```

Add required permissions for the products as described in chapter [Permissions](https://github.com/Jumio/mobile-sdk-android/blob/v3.4.1/README.md#permissions)
Add required permissions for the products as described in chapter [Permissions](https://github.com/Jumio/mobile-sdk-android/blob/v3.5.0/README.md#permissions)

Open the android project of your cordova project located in */platforms/android* and insert the dependencies from the products you require to your **build.gradle** file. (Module: android)

* [Netverify & Fastfill](https://github.com/Jumio/mobile-sdk-android/blob/v3.4.1/docs/integration_netverify-fastfill.md#dependencies)
* [Document Verification](https://github.com/Jumio/mobile-sdk-android/blob/v3.4.1/docs/integration_document-verification.md#dependencies)
* [BAM Checkout](https://github.com/Jumio/mobile-sdk-android/blob/v3.4.1/docs/integration_bam-checkout.md#dependencies)
* [Netverify & Fastfill](https://github.com/Jumio/mobile-sdk-android/blob/v3.5.0/docs/integration_netverify-fastfill.md#dependencies)
* [Document Verification](https://github.com/Jumio/mobile-sdk-android/blob/v3.5.0/docs/integration_document-verification.md#dependencies)
* [BAM Checkout](https://github.com/Jumio/mobile-sdk-android/blob/v3.5.0/docs/integration_bam-checkout.md#dependencies)

Due to the outdated Cordova platform that is not yet updated for Android API version 28 and AndroidX, it's necessary to adapt your project to support the proper build environment for the native Jumio Android component. Take a look at the [Demo App build.gradle](https://github.com/Jumio/mobile-cordova/blob/master/demo/platforms/android/build.gradle) how to upgrade to API level 28. The [FAQ section](#faq) at the bottom covers common build issues and how to fix them.
Open your Cordova Android project in Android Studio to get IDE auto-suggestions and support for all the required changes.
Expand All @@ -68,8 +68,7 @@ To initialize the SDK, perform the following call.
Jumio.initNetverify(<API_TOKEN>, <API_SECRET>, <DATACENTER>, {configuration});
```

Datacenter can either be **US** or **EU**.

Datacenter can either be **US**, **EU** or **SG**.


Configure the SDK with the *configuration*-Object.
Expand Down Expand Up @@ -161,7 +160,7 @@ To start the SDK, perform the following call.
Jumio.startAuthentication();
```

Datacenter can either be **US** or **EU**.
Datacenter can either be **US**, **EU** or **SG**.

Configure the SDK with the *configuration*-Object. **(configuration marked with * are mandatory)**

Expand Down Expand Up @@ -203,7 +202,7 @@ To initialize the SDK, perform the following call.
Jumio.initDocumentVerification(<API_TOKEN>, <API_SECRET>, <DATACENTER>, {configuration});
```

Datacenter can either be **US** or **EU**.
Datacenter can either be **US**, **EU** or **SG**.

Configure the SDK with the *configuration*-Object. **(configuration marked with * are mandatory)**

Expand Down Expand Up @@ -285,7 +284,7 @@ To Initialize the SDK, perform the following call.
Jumio.initBAM(<API_TOKEN>, <API_SECRET>, <DATACENTER>, {configuration});
```

Datacenter can either be **US** or **EU**.
Datacenter can either be **US**, **EU** or **SG**.



Expand Down Expand Up @@ -340,13 +339,13 @@ Jumio.startBAM(function(cardInformation) {
### Android

#### Netverify
The Netverify SDK can be customized to the respective needs by following this [customization chapter](https://github.com/Jumio/mobile-sdk-android/blob/v3.4.1/docs/integration_netverify-fastfill.md#customization).
The Netverify SDK can be customized to the respective needs by following this [customization chapter](https://github.com/Jumio/mobile-sdk-android/blob/v3.5.0/docs/integration_netverify-fastfill.md#customization).

#### BAM Checkout
The Netverify SDK can be customized to the respective needs by following this [customization chapter](https://github.com/Jumio/mobile-sdk-android/blob/v3.4.1/docs/integration_bam-checkout.md#customization).
The Netverify SDK can be customized to the respective needs by following this [customization chapter](https://github.com/Jumio/mobile-sdk-android/blob/v3.5.0/docs/integration_bam-checkout.md#customization).

#### Document Verification
The Netverify SDK can be customized to the respective needs by following this [customization chapter](https://github.com/Jumio/mobile-sdk-android/blob/v3.4.1/docs/integration_document-verification.md#customization).
The Netverify SDK can be customized to the respective needs by following this [customization chapter](https://github.com/Jumio/mobile-sdk-android/blob/v3.5.0/docs/integration_document-verification.md#customization).

### iOS
The SDK can be customized to the respective needs. You can pass the following customization options to the initializer:
Expand Down
4 changes: 2 additions & 2 deletions demo/config.xml
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
<?xml version='1.0' encoding='utf-8'?>
<widget id="com.jumio.cordova.demo" version="3.4.1" xmlns="http://www.w3.org/ns/widgets" xmlns:cdv="http://cordova.apache.org/ns/1.0">
<widget id="com.jumio.cordova.demo" version="3.5.0" xmlns="http://www.w3.org/ns/widgets" xmlns:cdv="http://cordova.apache.org/ns/1.0">
<name>DemoApp</name>
<description>
A sample Apache Cordova application that responds to the deviceready event.
Expand All @@ -23,7 +23,7 @@
<allow-intent href="itms-apps:*" />
<preference name="deployment-target" value="10.0" />
</platform>
<plugin name="cordova-plugin-jumio-mobilesdk" spec="git+https://github.com/Jumio/mobile-cordova.git#v3.4.1">
<plugin name="cordova-plugin-jumio-mobilesdk" spec="git+https://github.com/Jumio/mobile-cordova.git#v3.5.0">
<variable name="CAMERA_USAGE_DESCRIPTION" value="This will allow ${PRODUCT_NAME} to take photos of your credentials." />
</plugin>
<engine name="android" spec="8.0.0" />
Expand Down
6 changes: 3 additions & 3 deletions demo/package.json
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
{
"name": "com.jumio.cordova.demo",
"displayName": "DemoApp",
"version": "3.4.1",
"version": "3.5.0",
"description": "A sample Apache Cordova application that responds to the deviceready event.",
"main": "index.js",
"scripts": {
Expand All @@ -10,9 +10,9 @@
"author": "Apache Cordova Team",
"license": "Apache-2.0",
"dependencies": {
"cordova-android": "^8.0.0",
"cordova-android": "^8.1.0",
"cordova-ios": "^5.0.1",
"cordova-plugin-jumio-mobilesdk": "git+https://github.com/Jumio/mobile-cordova.git#v3.4.1"
"cordova-plugin-jumio-mobilesdk": "git+https://github.com/Jumio/mobile-cordova.git#v3.5.0"
},
"cordova": {
"plugins": {
Expand Down
2 changes: 1 addition & 1 deletion demo/platforms/android/app/build.gradle
Original file line number Diff line number Diff line change
Expand Up @@ -48,7 +48,7 @@ task wrapper(type: Wrapper) {
// Configuration properties. Set these via environment variables, build-extras.gradle, or gradle.properties.
// Refer to: http://www.gradle.org/docs/current/userguide/tutorial_this_and_that.html
ext {
SDK_VERSION = "3.4.1"
SDK_VERSION = "3.5.0"

apply from: '../CordovaLib/cordova.gradle'

Expand Down
2 changes: 1 addition & 1 deletion demo/platforms/android/app/src/main/AndroidManifest.xml
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
<?xml version='1.0' encoding='utf-8'?>
<manifest android:hardwareAccelerated="true" android:versionCode="30410" android:versionName="3.4.1" package="com.jumio.cordova.demo" xmlns:android="http://schemas.android.com/apk/res/android">
<manifest android:hardwareAccelerated="true" android:versionCode="30500" android:versionName="3.5.0" package="com.jumio.cordova.demo" xmlns:android="http://schemas.android.com/apk/res/android">
<supports-screens android:anyDensity="true" android:largeScreens="true" android:normalScreens="true" android:resizeable="true" android:smallScreens="true" android:xlargeScreens="true" />
<application android:hardwareAccelerated="true" android:icon="@mipmap/ic_launcher" android:label="@string/app_name" android:supportsRtl="true">
<activity android:configChanges="orientation|keyboardHidden|keyboard|screenSize|locale" android:label="@string/activity_name" android:launchMode="singleTop" android:name="MainActivity" android:theme="@android:style/Theme.DeviceDefault.NoActionBar" android:windowSoftInputMode="adjustResize">
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -144,7 +144,13 @@ private void initBAM(JSONArray data) {

String apiToken = data.getString(0);
String apiSecret = data.getString(1);
JumioDataCenter dataCenter = (data.getString(2).toLowerCase().equalsIgnoreCase("us")) ? JumioDataCenter.US : JumioDataCenter.EU;

JumioDataCenter dataCenter = null;
try {
dataCenter = JumioDataCenter.valueOf(data.getString(2).toUpperCase());
} catch (Exception e) {
throw new JSONException("Datacenter not valid: "+dataCenter);
}

bamSDK = BamSDK.create(cordova.getActivity(), apiToken, apiSecret, dataCenter);
}
Expand Down Expand Up @@ -258,7 +264,13 @@ private void initNetverify(JSONArray data) {

String apiToken = data.getString(0);
String apiSecret = data.getString(1);
JumioDataCenter dataCenter = (data.getString(2).toLowerCase().equalsIgnoreCase("us")) ? JumioDataCenter.US : JumioDataCenter.EU;

JumioDataCenter dataCenter = null;
try {
dataCenter = JumioDataCenter.valueOf(data.getString(2).toUpperCase());
} catch (Exception e) {
throw new JSONException("Datacenter not valid: "+dataCenter);
}

netverifySDK = NetverifySDK.create(cordova.getActivity(), apiToken, apiSecret, dataCenter);

Expand Down Expand Up @@ -379,7 +391,13 @@ private void initAuthentication(JSONArray data){

String apiToken = data.getString(0);
String apiSecret = data.getString(1);
JumioDataCenter dataCenter = (data.getString(2).toLowerCase().equalsIgnoreCase("us")) ? JumioDataCenter.US : JumioDataCenter.EU;

JumioDataCenter dataCenter = null;
try {
dataCenter = JumioDataCenter.valueOf(data.getString(2).toUpperCase());
} catch (Exception e) {
throw new JSONException("Datacenter not valid: "+dataCenter);
}

authenticationSDK = AuthenticationSDK.create(cordova.getActivity(), apiToken, apiSecret, dataCenter);

Expand Down Expand Up @@ -472,7 +490,13 @@ private void initDocumentVerification(JSONArray data) {

String apiToken = data.getString(0);
String apiSecret = data.getString(1);
JumioDataCenter dataCenter = (data.getString(2).toLowerCase().equalsIgnoreCase("us")) ? JumioDataCenter.US : JumioDataCenter.EU;

JumioDataCenter dataCenter = null;
try {
dataCenter = JumioDataCenter.valueOf(data.getString(2).toUpperCase());
} catch (Exception e) {
throw new JSONException("Datacenter not valid: "+dataCenter);
}

documentVerificationSDK = DocumentVerificationSDK.create(cordova.getActivity(), apiToken, apiSecret, dataCenter);

Expand Down
2 changes: 1 addition & 1 deletion demo/platforms/android/app/src/main/res/xml/config.xml
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
<?xml version='1.0' encoding='utf-8'?>
<widget id="com.jumio.cordova.demo" version="3.4.0" xmlns="http://www.w3.org/ns/widgets" xmlns:android="http://schemas.android.com/apk/res/android" xmlns:cdv="http://cordova.apache.org/ns/1.0">
<widget id="com.jumio.cordova.demo" version="3.5.0" xmlns="http://www.w3.org/ns/widgets" xmlns:cdv="http://cordova.apache.org/ns/1.0">
<feature name="JumioMobileSDK">
<param name="android-package" value="com.jumio.mobilesdk.JumioMobileSDK" />
</feature>
Expand Down
2 changes: 1 addition & 1 deletion demo/platforms/android/build.gradle
Original file line number Diff line number Diff line change
Expand Up @@ -42,7 +42,7 @@ allprojects {

//This replaces project.properties w.r.t. build settings
project.ext {
SDK_VERSION = "3.4.1"
SDK_VERSION = "3.5.0"
defaultBuildToolsVersion="29.0.0" //String
defaultMinSdkVersion=19 //Integer - Minimum requirement is Android 4.4
defaultTargetSdkVersion=29 //Integer - We ALWAYS target the latest by default
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,7 @@ repositories {
}

ext {
SDK_VERSION = "3.4.1"
SDK_VERSION = "3.5.0"
}

dependencies {
Expand All @@ -24,7 +24,7 @@ dependencies {

//for core:
implementation "androidx.appcompat:appcompat:1.1.0"
implementation "androidx.room:room-runtime:2.2.1"
implementation "androidx.room:room-runtime:2.2.3"
implementation "org.jetbrains.kotlin:kotlin-stdlib-jdk7:1.3.60"

//for nv:
Expand Down
3 changes: 3 additions & 0 deletions demo/platforms/ios/.gitignore
100755 → 100644
Original file line number Diff line number Diff line change
Expand Up @@ -3,3 +3,6 @@
*.pbxuser
.DS_Store
build/
cordova/
CordovaLib/
Pods/
Loading

0 comments on commit d40926c

Please sign in to comment.