Mobbeel for developers

Mobbeel for developers

  • MobbScan
  • MobbID
  • MobbSign
  • Clients
  • FAQ

›Getting Started

MobbID Android SDK

  • Requirements

Getting Started

  • Licenses
  • Configuration
  • Configure Face module

Biometric Operations

  • Code Examples

Migration Guides

  • Migration Guide from v6.13.1 to v7.0.0

Information

  • Changelog

Configure Face module

This section explains how to configure and use the MobbID Face module.

Step 1: Add MIDFaceView to your views or composables

You will need to use the MIDFaceView class in your project. This class is used to manage feedback messages during facial detection as well as to serve as the host for the camera surface.

If you are using traditional Android views (XML layout):

<?xml version="1.0" encoding="utf-8"?>
<FrameLayout xmlns:android="http://schemas.android.com/apk/res/android"
    android:layout_width="match_parent"
    android:layout_height="match_parent">

    <com.mobbeel.mobbid.face.ux.MIDFaceView
        android:id="@+id/face_view"
        android:layout_width="match_parent"
        android:layout_height="match_parent" />

</FrameLayout>

If you are using Jetpack Compose:

AndroidView(
    factory = { midFaceView },
    modifier = Modifier.fillMaxSize(),
)

Step 2: Configure MIDFaceView:

You must invoke the initView(initListener: (() -> Unit?)?) method to properly initialize the class. Optionally, you can pass a listener that will be called upon completion of the initialization.

midFaceView.post {
    midFaceView.initView{
        // TODO: MIDFaceView has been initialized
    }
}

Step 3: Configure MIDFaceSDK:

try {
    faceSDK = MIDFaceSDKBuilder().interactiveMode().apply {
        defaultCameraMode(MIDFaceCameraMode.FRONT)
        targetView(midFaceView.findViewById(com.mobbeel.mobbid.face.ux.R.id.camera_container))
        setDetectionBox(midFaceView.detectionBox)
        addFeedbackListener(midFaceView)
    }.build()
}catch (e: Exception) {
    // TODO: Implement comprehensive error handling logic here (logging, reporting, user feedback, etc.).
}

If your use case requires performing a liveness verification, you can configure it at this step:

try {
    faceSDK = MIDFaceSDKBuilder().interactiveMode().apply {
        defaultCameraMode(MIDFaceCameraMode.FRONT)
        targetView(midFaceView.findViewById(com.mobbeel.mobbid.face.ux.R.id.camera_container))
        setDetectionBox(midFaceView.detectionBox)
        addFeedbackListener(midFaceView)
        if (isPerformLivenessEnabled) {
            livenessDetectionMode(MIDFaceLivenessDetectionMode.HEAD_PASSIVE_IMAGE)
            addLivenessListener(midFaceView)
        }
    }.build()
}catch (e: Exception) {
    // TODO: Implement comprehensive error handling logic here (logging, reporting, user feedback, etc.).
}

The MIDFaceSDKBuilder class may throw exceptions if it is not configured properly or if the necessary permissions are not granted. These exceptions can be of type Exception or IllegalStateException. Each exception contains a message to report the circumstance that triggered it.

Step 4: Start a face biometric method:

You can now start using the facial biometric method of your choice. You will need to configure a set of parameters and callbacks specific to each method.

faceSDK.start(
    recognitionMode = recognitionMode,
    parameters = recognitionParameters,
    operationListener = callback,
)

You will find more detailed information on how to use the faceSDK.start(...) method, as well as the parameters associated with each method, in the code examples section.

← ConfigurationCode Examples →
Mobbeel for developers
Product Documentation
MobbIDMobbScanMobbSign
Connect
LinkedInFacebookX
More
FAQContact Us
Mobbeel Solutions SL
Copyright © 2025 Mobbeel Solutions SL