Skip to main content

Preparation

Overview

BioMatch SDK provides facial recognition and PIN verification features for secure user authentication.
Before integrating the SDK into your project, make sure you have completed the following preparation steps.
These steps ensure the SDK functions properly by allowing camera access, internet connectivity, and proper code obfuscation handling.

Required Dependencies

Gradle Configuration

Add the BioMatch SDK to your build.gradle.
This is required so that your project can access the SDK’s classes and methods:

implementation '"ai.amani.android.sdk:biomatch:1.0.01"'

Make sure your project can resolve the SDK by adding the following Maven repository to your settings.gradle or build.gradle:

dependencyResolutionManagement {
repositoriesMode.set(RepositoriesMode.FAIL_ON_PROJECT_REPOS)
repositories {
maven {
url = uri("https://jfrog.amani.ai/artifactory/amani-biomatch-sdk/")
}
}
}

Permissions

BioMatch SDK requires access to the camera for capturing selfies and the internet for secure server communication. Add the following permissions to your AndroidManifest.xml:

    <uses-permission android:name="android.permission.ACCESS_COARSE_LOCATION" />
<uses-permission android:name="android.permission.ACCESS_FINE_LOCATION" />
<uses-permission android:name="android.permission.INTERNET" />
<uses-permission android:name="android.permission.CAMERA" />
<uses-permission
android:name="android.permission.WRITE_EXTERNAL_STORAGE"
android:maxSdkVersion="28" />
<uses-permission android:name="android.permission.READ_EXTERNAL_STORAGE"
android:maxSdkVersion="32" />
<uses-permission android:name="android.permission.ACCESS_NETWORK_STATE" />
<uses-permission android:name="android.permission.READ_PHONE_STATE" />
<uses-feature android:name="android.hardware.camera" />

ProGuard Rules

If you are using ProGuard code shrinking and obfuscation, you must add the following rules. These rules prevent the SDK’s classes from being removed or renamed, ensuring the SDK continues to function correctly:

-keep class ai.amani.biomatch.** { *; }
-dontwarn ai.amani.biomatch.**