We need to add these lines to build.gradle file (in app module)
defaultConfig {
…
// Support for vector drawable
vectorDrawables.useSupportLibrary = true
// Add if other librarrys have more architectures
ndk {
// Supported "armeabi-v7a”, "x86", 'x86_64', "arm64-v8a"
abiFilters "armeabi-v7a" , "arm64-v8a"
}
// We are using 8 JavacompileOptions
{
sourceCompatibility JavaVersion.VERSION_1_8
targetCompatibility JavaVersion.VERSION_1_8
}
Note: Needed for correctly selecting supported architectures. We support:’armeabi-v7a’, ‘x86’, ‘x86_64’, “arm64-v8a”. There are no known devices running x86_64 only emulator so it can be excluded from final build. To lower size, you can remove x86 support, in theory all x86 devices should support Armv7 with around 30% hit to performance, there are exotic devices which possibly don’t support this “arm64-v8a” and ‘armeabi-v7a’ will be mandatory by google play store from 2019. August to be included to .apk or bundle.
In the manifest file, the below permissions and features should be added:
<!-- Required for capturing document, selfie and Proof Of Address images -->
<uses-permission android:name="android.permission.CAMERA" />
<!-- Required for communication with IDscan enterprise onboarding service -->
<uses-permission android:name="android.permission.INTERNET" />
<!-- Permission used for liveness action changes, if not added we will not vibrate on action change. -->
<uses-permission android:name="android.permission.VIBRATE" />
<!-- Camera features - recommended -->
<uses-feature android:name="android.hardware.camera" android:required="true" />
<uses-feature android:name="android.hardware.camera.autofocus" android:required="false" />
<uses-feature android:name="android.hardware.camera.flash" android:required="false" />
SDK should be initialized before using any SDK function. You can either initialize before using directly (lazy) or while application/activity creation.
MJCS.init(context);
Kotlin
MJCS.init(this@YourActivityActivity)
Note: The SDK initializing takes a few seconds, so it should not be called on the UI thread as IO operations are happening.