Skip to Content
Android SDKGetting startedOverview

Getting started

This page gets a working fingerprint enrollment running against the Slade ID service. It is the happy path; alternatives live in Guides.

Before you start, read Prerequisites and confirm you have a supported reader, a USB-OTG connection, and integrator credentials.

1. Add the dependency

The SDK ships as an Android library (.aar). Add it to your app module — it bundles the vendor reader SDKs (SecuGen, BioMini, EADAK) and their native libraries.

// app/build.gradle.kts dependencies { implementation("com.sladeid:biometric-capture:<version>") }

minSdk is 24. The library targets JDK 17.

2. Declare USB host support

The SDK reads the reader over USB-OTG, so the host activity must declare USB support and be reachable by USB attach intents. Add to your AndroidManifest.xml:

<uses-feature android:name="android.hardware.usb.host" android:required="true" /> <activity android:name=".MainActivity" android:launchMode="singleTop"> <intent-filter> <action android:name="android.hardware.usb.action.USB_DEVICE_ATTACHED" /> </intent-filter> <meta-data android:name="android.hardware.usb.action.USB_DEVICE_ATTACHED" android:resource="@xml/device_filter" /> </activity>

3. Initialize the SDK

val sdk = SladeID( context, SladeIDConfig( serviceUrl = "https://id.example.com/api/v1", auth = ClientCredentialsAuth( clientId = BuildConfig.SLADEID_CLIENT_ID, clientSecret = BuildConfig.SLADEID_CLIENT_SECRET, ), ), )

The SDK identifies the device automatically for attribution — you never pass it. See Authentication.

4. Discover a reader

startReaderDiscovery() returns a ReaderManager whose readers flow emits connected, permissioned readers. Collect it from a coroutine scope (e.g. your ViewModel):

val manager = sdk.startReaderDiscovery() lifecycleScope.launch { manager.readers.collect { readers -> // render a picker, or auto-pick the first val reader = readers.firstOrNull() ?: return@collect } } // When the host activity receives a USB attach intent (or a "connect" tap): manager.requestPermissions()

5. Enroll a finger (two captures)

Enrolling a finger takes two captures: enroll stores an unverified print, then verifyEnrollment promotes it to verified. See Fingerprint enrollment.

val session = sdk.createFingerprintReaderSession(reader.id) // First capture — stores an unverified print. val enrolled = session.enroll(enrollee = "CR-123", position = 2) // Second capture — promotes to verified on a match. val verified = session.verifyEnrollment(enrollee = "CR-123", position = 2) if (verified?.positionVerified == true) { // finger complete; check verified.enrollmentStatus for the whole subject }

All capture methods are suspend functions and return null on a handled failure (the error is emitted on session.errors) — never throw across the API boundary.

Next