SDK Configuration using only Fingerprint technology
Android
In order to use MobbID Android SDK in your application only for the fingerprint 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-Fingerprint-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 3rd party libraries provided in the .zip distribution file
// MobbID SDK 3rd party libraries
// CORE
implementation 'com.google.code.gson:gson:2.7
implementation 'com.google.protobuf:protobuf-java:2.5.0'
// FINGERPRINT
implementation(name:"samsung-android-sdk-1.0.0", ext:'jar')
implementation(name:"samsung-android-sdk-pass-1.2.0", ext:'jar')
}
Permissions
These are the permissions needed if you are going to use the fingerprint module
<uses-permission android:name="android.permission.INTERNET" />
<uses-permission android:name="android.permission.ACCESS_NETWORK_STATE" />
<uses-permission android:name="android.permission.USE_FINGERPRINT" />
You don't need to declare those permissions in your AndroidManifest.xml
file since they are already declare in the libraries's AndroidManifest.xml
and they will be merged automatically when you build your app.
Distributing to the PlayStore
iOS
The different MobbID biometric options are stand-alone technologies. In order to use only the MobbID Fingerprint 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_Fingerprint.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_Fingerprint.framework/remove_simulator_archs.sh"
Finally, the access to neither the device microphone nor the camera are not required for Fingerprint technology thus they should not be specified unless another feature of your app requires them.
... and that's it. We recommend taking a look at the biometric operations and the other options available for the fingerprint module.