Installation
The MobbID Android SDK is distributed through Mobbeel's private Maven repository. Gradle resolves the SDK modules and all their transitive dependencies.
Requirements
- Android
- 5.0 or laterAPI level 21
- compileSdk
- 35
- Camera
- Front camera with autofocus
- Network
- Internet connectionBiometric operations run on your MobbID server.
- Architectures
arm64-v8aarmeabi-v7a- Credentials
- Maven credentials, application ID and API keyProvided by Mobbeel.
1. Add the Maven repository
Store the repository credentials provided by Mobbeel outside source control, in your user-level ~/.gradle/gradle.properties file. In CI pipelines, inject them from your secret store.
mobbeelRepoUser=YOUR_CLIENT_ID
mobbeelRepoPassword=YOUR_CLIENT_PASSWORD
Declare the repository in settings.gradle.kts:
val mobbeelUser = providers.gradleProperty("mobbeelRepoUser").get()
val mobbeelPass = providers.gradleProperty("mobbeelRepoPassword").get()
dependencyResolutionManagement {
repositoriesMode.set(RepositoriesMode.FAIL_ON_PROJECT_REPOS)
repositories {
google()
mavenCentral()
maven {
url = uri("https://repository.mobbeel.com/repository/release/")
credentials {
username = mobbeelUser
password = mobbeelPass
}
}
}
}
2. Add the dependencies
The SDK is modular. A face integration with the built-in camera view uses three modules:
| Module | Artifact | Provides |
|---|---|---|
| Core | com.mobbeel.mobbid:core | Initialisation and communication with the MobbID server. Always required. |
| Face | com.mobbeel.mobbid:face | Face detection, liveness and the biometric operations. |
| Face UX | com.mobbeel.mobbid:face-ux | MIDFaceView, the ready-made camera view with user guidance. |
- build.gradle.kts
- Version catalog
dependencies {
implementation("com.mobbeel.mobbid:core:7.2.1")
implementation("com.mobbeel.mobbid:face:7.2.1")
implementation("com.mobbeel.mobbid:face-ux:7.2.1")
}
[versions]
mobbid = "7.2.1"
[libraries]
mobbid-sdk-core = { module = "com.mobbeel.mobbid:core", version.ref = "mobbid" }
mobbid-sdk-face = { module = "com.mobbeel.mobbid:face", version.ref = "mobbid" }
mobbid-sdk-face-ux = { module = "com.mobbeel.mobbid:face-ux", version.ref = "mobbid" }
dependencies {
implementation(libs.mobbid.sdk.core)
implementation(libs.mobbid.sdk.face)
implementation(libs.mobbid.sdk.face.ux)
}
Since version 7.2.1, MobbID and the MobbScan SDK share the same face detection engine. Both SDKs can be included in the same app without duplicate class conflicts.
SDK size
| Modules | arm64-v8a | armeabi-v7a | Both ABIs |
|---|---|---|---|
core + face + face-ux | 33.85 MiB | 21.06 MiB | 51.71 MiB |
These figures correspond to the artifacts resolved from the repository. The size added to your APK or App Bundle is smaller and depends on the ABIs you distribute.
3. Permissions
The SDK manifests declare the permissions they need and are merged into your app at build time, so you do not need to add them to your AndroidManifest.xml. You must, however, request the runtime permissions before opening the camera. MIDFaceSDK returns the list:
val permissions: List<String> = MIDFaceSDK.getRequiredPermissions()
4. Prepare release builds
Restrict the ABIs (optional)
Distribute only the architectures supported by the SDK to reduce the size of your APK:
android {
defaultConfig {
ndk {
abiFilters += listOf("armeabi-v7a", "arm64-v8a")
}
}
}
ProGuard / R8
The SDK ships consumer rules that R8 applies automatically. If minification removes classes required at runtime, add these rules to your project:
# MobbID
-keep class com.mobbeel.mobbid.** { *; }
-dontwarn com.mobbeel.mobbid.**
-keepattributes *Annotation*, Exceptions, Deprecated, Signature, MethodParameters, InnerClasses
# Native methods
-keepclasseswithmembernames class * {
native <methods>;
}
# Parcelable implementations
-keep class * implements android.os.Parcelable {
public static final android.os.Parcelable$Creator *;
}
# Protobuf
-keep public class com.google.protobuf.** { *; }
Troubleshooting
Gradle sync fails with
401 UnauthorizedCheck the Maven credentials ingradle.properties. If you do not have them or they have expired, contact Mobbeel.Classes are missing in release builds
Add the ProGuard rules above and remove any rules written for the former.aardistribution.Your project still uses
.aarfilesFollow the migration guide.Dependency version conflicts
Inspect the dependency tree with./gradlew app:dependenciesand align the conflicting versions.
Next step
Initialise the SDK and verify your first user in the Quick start.