Skip to main content

Installation

Step 1: Add Repository

Add the Artifactory repository to your project's build.gradle (project level) or settings.gradle:

repositories {
maven {
url = uri("http://android.metric.africa:8081/artifactory/metric-sdk-sdk")
allowInsecureProtocol = true
credentials {
username = "your-artifactory-username"
password = "your-artifactory-password"
}
}
}
Note

Contact the Metric Fingerprint Team to obtain Artifactory credentials.

Step 2: Add Dependency

Add the dependency to your module's build.gradle:

dependencies {
// Compose BOM (required - SDK uses compileOnly for Compose dependencies)
implementation platform('androidx.compose:compose-bom:2025.01.01') or compatible
implementation 'androidx.compose.ui:ui'
implementation 'androidx.compose.ui:ui-tooling-preview'
implementation 'androidx.compose.material3:material3'
implementation 'androidx.compose.foundation:foundation'

// Metric Fingerprint SDK
implementation 'com.metric.fingerprint:metric-fingerprint:0.1.5'
}

Important Notes

The UI module automatically includes metric-fingerprint-core, so you don't need to add both dependencies.

  • Compose Dependencies: The SDK uses compileOnly for Compose dependencies to prevent version conflicts. You must include Compose dependencies in your app. Use the Compose BOM for version management.
  • Compose Compiler: Ensure your kotlinCompilerExtensionVersion matches the Compose Compiler version (1.5.5 recommended).

Permissions

The SDK automatically handles permission requests. Add required permissions to your AndroidManifest.xml:

<!-- Camera permission - required for IBScan fingerprint scanner -->
<uses-permission android:name="android.permission.CAMERA" />
<uses-feature android:name="android.hardware.camera" android:required="false" />

<!-- USB host feature for fingerprint scanner -->
<uses-feature android:name="android.hardware.usb.host" android:required="false" />
Important

The SDK's Activity (FingerprintAuthActivity) is automatically merged into your app manifest. You do not need to manually add it to your manifest.