Skip to content

Commit

Permalink
Add integration assistance for Android
Browse files Browse the repository at this point in the history
  • Loading branch information
JumioMobileTeam committed Jun 4, 2019
1 parent caf8494 commit 1dbbae1
Show file tree
Hide file tree
Showing 2 changed files with 25 additions and 2 deletions.
25 changes: 25 additions & 0 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -55,6 +55,9 @@ Open the android project of your cordova project located in */platforms/android*
* [Document Verification](https://github.com/Jumio/mobile-sdk-android/blob/v3.1.0/docs/integration_document-verification.md#dependencies)
* [BAM Checkout](https://github.com/Jumio/mobile-sdk-android/blob/v3.1.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.

## Usage

### Netverify / Fastfill
Expand Down Expand Up @@ -456,6 +459,28 @@ The JSONObject with all the extracted data that is returned for the specific pro
No data returned.
# FAQ
This is a list of common Android build issues and how to resolve them:
* Gradle plugin 4.X not supported, please install 5.X
-> Change the version in the gradle-wrapper.properties file
* MinSdkVersion/TargetSdkVersion not supported in AndroidManifest.xml
-> Remove both versions from AndroidManifest.xml as suggested by Android Studio (as they are taken from build.gradle only since Gradle 5)
* Command "compile" is obsolete, use implementation instead
-> Change all dependency declarations to use "implementation" instead of "compile" to support the latest gradle changes - https://github.com/Jumio/mobile-cordova/blob/master/demo/platforms/android/build.gradle#L291
* Theme.Netverify/Bam/DocumentVerification/Authentication cannot be resolved
-> Add the Jumio dependencies as proposed here: https://github.com/Jumio/mobile-cordova/blob/master/demo/platforms/android/build.gradle#L95
* Ressources from styles.xml "cornerRadius" and others not found
-> Build tools and support library are not at version 28. Change compileSdk and buildToolsVersion as described here -> https://github.com/Jumio/mobile-cordova/blob/master/demo/platforms/android/build.gradle#L222
* Device-ready not fired after X seconds
-> The plugin definition in "YOURPROJECT/platforms/android/platform_www/plugins/cordova-plugin-jumio-mobilesdk/www" might be duplicated/corrupted due to the issue mentioned in this Stackoverflow post - https://stackoverflow.com/questions/28017540/cordova-plugin-javascript-gets-corrupted-when-added-to-project/28264312#28264312 , please fix the duplicated "cordova.define()" call in these files as mentioned in the post.
# Support
## Contact
Expand Down
2 changes: 0 additions & 2 deletions www/JumioMobileSDK.js
Original file line number Diff line number Diff line change
@@ -1,4 +1,3 @@
cordova.define("cordova-plugin-jumio-mobilesdk.JumioMobileSDK", function(require, exports, module) {
var exec = require('cordova/exec');

exports.initNetverify = function(token, secret, datacenter, options, customization) {
Expand Down Expand Up @@ -49,4 +48,3 @@ exports.initDocumentVerification = function(token, secret, datacenter, options,
exports.startDocumentVerification = function(success, error) {
exec(success, error, "JumioMobileSDK", "startDocumentVerification", []);
};
});

0 comments on commit 1dbbae1

Please sign in to comment.