Skip to main content

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.

~/.gradle/gradle.properties
mobbeelRepoUser=YOUR_CLIENT_ID
mobbeelRepoPassword=YOUR_CLIENT_PASSWORD

Declare the repository in settings.gradle.kts:

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:

ModuleArtifactProvides
Corecom.mobbeel.mobbid:coreInitialisation and communication with the MobbID server. Always required.
Facecom.mobbeel.mobbid:faceFace detection, liveness and the biometric operations.
Face UXcom.mobbeel.mobbid:face-uxMIDFaceView, the ready-made camera view with user guidance.
app/build.gradle.kts
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")
}
Integrating MobbScan as well

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​

Modulesarm64-v8aarmeabi-v7aBoth ABIs
core + face + face-ux33.85 MiB21.06 MiB51.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:

app/build.gradle.kts
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:

proguard-rules.pro
# 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 Unauthorized
    Check the Maven credentials in gradle.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 .aar distribution.
  • Your project still uses .aar files
    Follow the migration guide.
  • Dependency version conflicts
    Inspect the dependency tree with ./gradlew app:dependencies and align the conflicting versions.

Next step​

Initialise the SDK and verify your first user in the Quick start.