BiometridFull - Android Integration Guide¶
Overview¶
BiometridFull is a comprehensive identity verification SDK that provides a complete, It integrates all BiometridStandard modules (Liveness, NFC, AutoCapture) into a single, unified interface. The SDK manages the entire verification process through a web interface while leveraging native device capabilities for biometric operations.
Prerequisites¶
- Android API Level 26+ (Android 8.0)
- Kotlin 2.2.0+
- AndroidX AppCompat
- Camera, Microphone and NFC permissions declared in
AndroidManifest.xml
Installation¶
Starting with 3.3.0, BiometridFull is distributed as a modular Android library. The main AAR contains the SDK code with native step dependencies declared as compileOnly. To use a step, declare its bridge alongside the main dependency — the bridge is a POM-only artifact that pulls in the right native libraries for that step.
You only need to add the repositories required by the bridges you actually use. If you never use NFC, you don't need the Regula repo. If you never use YV, you don't need the Youverse repo.
1. Always-required setup¶
Every integration needs the main artifact plus its repositories.
Repositories (add to settings.gradle.kts or your project-level build.gradle.kts):
repositories {
google()
mavenCentral()
// BiometridFull main artifact + all bridges live here
maven { url = uri("https://dl.cloudsmith.io/public/biometrid/mobile/maven/") }
}
Main dependency (in your app's build.gradle.kts):
dependencies {
implementation("com.biometrid:biometridfull:3.3.0")
}
2. Add bridges per step¶
Declare one bridge for each step your flow uses. Each bridge is paired with the repository (or repositories) where its native dependencies are hosted.
Liveness bridge¶
// settings.gradle.kts (or project repositories)
maven { url = uri("https://dl.cloudsmith.io/public/biometrid/face01-liveness/maven/") }
maven { url = uri("https://raw.githubusercontent.com/iProov/android/master/maven/") }
// app build.gradle.kts
implementation("com.biometrid:biometridfull-liveness:3.3.0")
Pulls in face01 active liveness and iProov.
NFC bridge¶
// settings.gradle.kts
maven { url = uri("https://maven.regulaforensics.com/RegulaDocumentReader/") }
// app build.gradle.kts
implementation("com.biometrid:biometridfull-nfc:3.3.0")
Pulls in Regula DocumentReader (mrzrfid + api).
AutoCapture bridge¶
// No extra repository needed — deps come from mavenCentral
// app build.gradle.kts
implementation("com.biometrid:biometridfull-autocapture:3.3.0")
Pulls in LiteRT + ONNX Runtime. CameraX is already part of the main AAR.
VideoConference bridge¶
// No extra repository needed — deps come from mavenCentral
// app build.gradle.kts
implementation("com.biometrid:biometridfull-videoconference:3.3.0")
Pulls in LiveKit (io.livekit:livekit-android) and transitively AutoCapture's deps.
VideoLiveness bridge¶
// No extra repository needed — deps come from mavenCentral
// app build.gradle.kts
implementation("com.biometrid:biometridfull-videoliveness:3.3.0")
Pulls in MediaPipe Tasks Vision, and transitively AutoCapture's deps.
3. Example: a KYC flow with Liveness + NFC + AutoCapture¶
// settings.gradle.kts
dependencyResolutionManagement {
repositories {
google()
mavenCentral()
maven { url = uri("https://dl.cloudsmith.io/public/biometrid/mobile/maven/") }
// Liveness bridge
maven { url = uri("https://dl.cloudsmith.io/public/biometrid/face01-liveness/maven/") }
maven { url = uri("https://raw.githubusercontent.com/iProov/android/master/maven/") }
// NFC bridge
maven { url = uri("https://maven.regulaforensics.com/RegulaDocumentReader/") }
// AutoCapture bridge needs no extra repos — mavenCentral is enough
}
}
// app build.gradle.kts
dependencies {
implementation("com.biometrid:biometridfull:3.3.0")
implementation("com.biometrid:biometridfull-liveness:3.3.0")
implementation("com.biometrid:biometridfull-nfc:3.3.0")
implementation("com.biometrid:biometridfull-autocapture:3.3.0")
}
4. Required Permissions¶
Add the following permissions to your AndroidManifest.xml:
<uses-permission android:name="android.permission.INTERNET" />
<uses-permission android:name="android.permission.CAMERA" />
<uses-permission android:name="android.permission.RECORD_AUDIO" />
<uses-permission android:name="android.permission.NFC" />
<uses-permission android:name="android.permission.MODIFY_AUDIO_SETTINGS" />
<uses-feature android:name="android.hardware.nfc" android:required="false" />
<uses-feature android:name="android.hardware.camera" android:required="false" />
<uses-feature android:name="android.hardware.camera.front" android:required="false" />
<uses-feature android:name="android.hardware.microphone" android:required="false" />
5. Register Required Activities¶
The SDK uses internal activities that must be declared in your AndroidManifest.xml inside the <application> tag:
<activity
android:name="com.biometrid.biometridfull.ui.BiometridFullComposeActivity"
android:theme="@style/Theme.AppCompat.Light.NoActionBar"
android:exported="false" />
<activity
android:name="com.biometrid.autocapture.ui.AutoCaptureActivity"
android:exported="false" />
<activity
android:name="com.biometrid.biometridfull.webview.AndroidWebViewActivity"
android:theme="@style/Theme.AppCompat.Light.NoActionBar"
android:exported="false" />
<activity
android:name="com.biometrid.biometridstandardnfc.activity.BiometridNFCActivity"
android:exported="false" />
Initialization¶
import com.biometrid.biometridfull.BiometridFull
import com.biometrid.biometridfull.callbacks.BiometridFullCallback
import com.biometrid.biometridfull.helpers.ScreenType
import com.biometrid.biometridstandard.enums.Language
import com.biometrid.biometridstandard.model.BiometridErrorInfo
// 1. Create your callback implementation
val callback = object : BiometridFullCallback {
override val url: String = "your-url"
override val app: String = "your-app-id"
override val appUrl: String = "your-app-url"
override val credential: String = "your-credential"
override val language: Language = Language.English
override val customHeaders: Map<Any?, *>? = null
override fun initialized(status: Boolean, error: BiometridErrorInfo?) {
// Handle initialization result
}
override fun processCreated(processId: String) {
// Handle process creation
}
override fun processUpdated(processId: String, stepId: String, action: String) {
// Handle step update — process moved to the next step
}
override fun processFinished(processId: String) {
// Handle process completion
}
override fun error(status: Boolean, error: BiometridErrorInfo) {
// Handle errors
}
}
// 2. Create the BiometridFull instance
val biometridFull = BiometridFull(callback)
Available Methods¶
initialize()¶
Initializes the SDK by connecting to the Biometrid backend and preparing all required services.
suspend fun initialize()
This method must be called before start(). It performs backend authentication using the provided url, app, and credential from the callback. The result is delivered through the initialized callback.
start(processId, screenType)¶
Starts the identity verification process and presents the WebView interface.
suspend fun start(processId: String?, screenType: ScreenType)
| Parameter | Type | Description |
|---|---|---|
processId |
String? |
Optional process ID. Pass null to create a new process, or provide an existing ID to resume. |
screenType |
ScreenType |
Platform-specific screen context. On Android, wrap the current Context. |
stop()¶
Stops the current verification process and cleans up all resources.
fun stop()
Stops any active WebView sessions, cancels pending native operations (Liveness, NFC, AutoCapture), and releases associated resources. Safe to call at any point.
Callback Interface¶
BiometridFullCallback¶
The callback interface that must be implemented to receive SDK lifecycle events and provide configuration.
Properties¶
| Property | Type | Description |
|---|---|---|
url |
String |
The Biometrid API base URL (e.g., https://api.biometrid.com/) |
app |
String |
Your application identifier provided by Biometrid |
appUrl |
String |
The Biometrid web application URL (e.g., https://app.biometrid.com/) |
credential |
String |
Your credential key provided by Biometrid |
language |
Language |
The language for the verification interface |
customHeaders |
Map<Any?, *>? |
Optional custom HTTP headers to include in API requests |
Methods¶
| Method | Description |
|---|---|
initialized(status: Boolean, error: BiometridErrorInfo?) |
Called when SDK initialization completes. status is true on success. |
processCreated(processId: String) |
Called when a new verification process is created. |
processUpdated(processId: String, stepId: String, action: String) |
Called when a step is successfully updated and the process moves to the next step. |
processFinished(processId: String) |
Called when the verification process completes successfully. |
error(status: Boolean, error: BiometridErrorInfo) |
Called when an error occurs during the verification process. |
Data Models¶
BiometridErrorInfo¶
data class BiometridErrorInfo(
val code: String? = null,
val message: String? = null,
val data: JsonElement? = null
)
| Property | Type | Description |
|---|---|---|
code |
String? |
Error code identifier (e.g., "MBF001") |
message |
String? |
Human-readable error description |
data |
JsonElement? |
Optional additional error data |
ScreenType¶
Platform-specific screen context wrapper used to present the verification interface.
// Android
class ScreenType(val context: Context)
| Property | Type | Description |
|---|---|---|
context |
Context |
The Android Context (typically an Activity) used to present the WebView |
Enums¶
Language¶
enum class Language(val value: String) {
English("en-GB"),
Portuguese("pt-PT"),
French("fr-FR"),
Spanish("es-ES"),
Italian("it-IT")
}
Error Handling¶
Errors are delivered through the error method of BiometridFullCallback. Each error includes a BiometridErrorInfo object with a code and descriptive message.
Error codes follow the prefix convention:
MBF- BiometridFull module errors
Handle errors in the callback:
override fun error(status: Boolean, error: BiometridErrorInfo) {
val errorCode = error.code ?: "Unknown"
val errorMessage = error.message ?: "An unknown error occurred"
// Handle or display the error
}
Usage Example¶
ViewModel Integration¶
import androidx.lifecycle.ViewModel
import androidx.lifecycle.viewModelScope
import com.biometrid.biometridfull.BiometridFull
import com.biometrid.biometridfull.callbacks.BiometridFullCallback
import com.biometrid.biometridfull.helpers.ScreenType
import com.biometrid.biometridstandard.enums.Language
import com.biometrid.biometridstandard.model.BiometridErrorInfo
import kotlinx.coroutines.flow.MutableStateFlow
import kotlinx.coroutines.flow.StateFlow
import kotlinx.coroutines.launch
class BiometridFullVM : ViewModel() {
private val _isInitialized = MutableStateFlow(false)
val isInitialized: StateFlow<Boolean> = _isInitialized
private val _error = MutableStateFlow<String?>(null)
val error: StateFlow<String?> = _error
private val _isProcessCompleted = MutableStateFlow(false)
val isProcessCompleted: StateFlow<Boolean> = _isProcessCompleted
private val biometridFull = BiometridFull(object : BiometridFullCallback {
override val url = "your-url"
override val app = "your-app-id"
override val appUrl = "your-app-url"
override val credential = "your-credential"
override val language = Language.English
override val customHeaders: Map<Any?, *>? = null
override fun initialized(status: Boolean, error: BiometridErrorInfo?) {
_isInitialized.value = status
error?.let { _error.value = it.message }
}
override fun processCreated(processId: String) {
// Store processId if needed
}
override fun processUpdated(processId: String, stepId: String, action: String) {
// Step updated, process moved to next step
}
override fun processFinished(processId: String) {
_isProcessCompleted.value = true
}
override fun error(status: Boolean, error: BiometridErrorInfo) {
_error.value = error.message
}
})
fun initialize() {
viewModelScope.launch {
biometridFull.initialize()
}
}
fun start(context: android.content.Context) {
viewModelScope.launch {
biometridFull.start(
processId = null,
screenType = ScreenType(context)
)
}
}
fun stop() {
biometridFull.stop()
}
override fun onCleared() {
super.onCleared()
biometridFull.stop()
}
}
Activity Usage¶
class MainActivity : AppCompatActivity() {
private val viewModel: BiometridFullVM by viewModels()
override fun onCreate(savedInstanceState: Bundle?) {
super.onCreate(savedInstanceState)
// Observe state
lifecycleScope.launch {
viewModel.isInitialized.collect { initialized ->
if (initialized) {
// SDK is ready, enable start button
}
}
}
lifecycleScope.launch {
viewModel.error.collect { error ->
error?.let {
// Show error to user
}
}
}
lifecycleScope.launch {
viewModel.isProcessCompleted.collect { completed ->
if (completed) {
// Verification process completed
}
}
}
// Initialize the SDK
viewModel.initialize()
// Start verification when ready (e.g., on button click)
startButton.setOnClickListener {
viewModel.start(this)
}
}
override fun onDestroy() {
super.onDestroy()
viewModel.stop()
}
}