SDK Configuration using only Face technology
Android
In order to use MobbID Android SDK in your application only for the face technology you must follow these steps:
- Include the sdk libraries by copying it to your application’s libs folder and add this line (change it to the current version) to your
build.gradle
file (dependencies section):
dependencies {
...
implementation(name:'MobbIDSDK-Core-Android-5.0.0', ext:'aar')
implementation(name:'MobbIDSDK-Face-Android-5.0.0', ext:'aar')
// This module is only needed if you will use the default UI for face recognition
implementation(name:'MobbIDSDK-Face-UX-Android-5.0.0', ext:'aar')
}
- Add a flatDir repository to your
build.gradle
file so that gradle can find the.aar
files in yourlibs
folder:
repositories {
mavenCentral()
flatDir {
dirs 'libs'
}
}
- Add third party dependencies and package exclusions to your
build.gradle
file:
dependencies {
...
// MobbID SDK 3rd party libraries
// CORE
implementation 'com.google.code.gson:gson:2.7
implementation 'com.google.protobuf:protobuf-java:2.5.0'
// FACE
implementation "org.jetbrains.kotlin:kotlin-stdlib-jre7:1.1.2"
}
Permissions
You don't need to declare any permissions in your AndroidManifest.xml
file since they are already declared in the libraries's AndroidManifest.xml
and they will be merged automatically when you build your app.
iOS
The different MobbID biometric options are stand-alone technologies. In order to use only the MobbID Face technology you will need to follow the same steps detailed under the General Configuration section.
Instead of embedding all the frameworks in this case you will be needing just the following ones:
MobbIDSDK_Core.framework
MobbIDSDK_Face.framework
Likewise, the Run Script build phase only need to run those scripts belonging to the embedded frameworks:
sh "${BUILT_PRODUCTS_DIR}/${FRAMEWORKS_FOLDER_PATH}/MobbIDSDK_Core.framework/remove_simulator_archs.sh"
sh "${BUILT_PRODUCTS_DIR}/${FRAMEWORKS_FOLDER_PATH}/MobbIDSDK_Face.framework/remove_simulator_archs.sh"
Finally, the access to the device microphone is not required for Face technology thus it should not be specified unless another feature of your app requires it.