Download the example app
A single-screen Jetpack Compose app — fill in the config block, build, and run on a device. Walks the full flow: register → pick a method (NFC / card reader / manual) → result.
1. Install
Add the Nexus repository (Configure Nexus) and the dependencies. Include only the service packages whose hardware you support.mbkyc-android transitively pulls rustls:rustls-platform-verifier — the native layer calls into it to verify TLS certificates against the Android trust store on every MBKYC.create. It’s an api dependency, so you don’t declare it yourself, but it is served from your mbkyc-maven Nexus repository (group rustls), not Maven Central or Google. Make sure your repository configuration lets the rustls group resolve from Nexus — see Configure Nexus. A missing rustls artifact surfaces at runtime as ClassNotFoundException: org.rustls.platformverifier.CertificateVerifier.2. Initialize
MBKYC.create() returns an MBKYCResult — call .getOrThrow() if you prefer exceptions. On Android you must pass a Context.
3. Discover readers & register
4. Validate
validate(request) dispatches on the request type and whether a fingerprint is attached.
- Emirates ID
- Passport
Manual entry — no hardware required.Card read — needs a USB CCID smart card reader.NFC — reads the chip over the device’s built-in NFC (Android only).+ Fingerprint — attach a
fingerprint to any Emirates ID request above to add a biometric match (needs a fingerprint sensor).dateOfBirth, issueDate, expiryDate, fingerprint, clientReferenceId) are in the Full API reference.
Fingerprint recommendation handler
The SDK calls this mid-flow with the Validation Gateway’s quality-ranked finger list:Hardware support model
A hardware integration can live inside your own app or in a separate companion app — whichever fits your deployment. Either way it must carry the same Android signing certificate as your app, because the connection between them is protected at the signature level. There’s nothing else to wire up: the SDK discovers the available readers and sensors and surfaces them throughlistSmartcardReaders() / listFingerprintReaders().
USB device attach
Android only shows the “Open App when this USB device is connected?” prompt for an activity. To opt in, your launcher activity declares one<intent-filter> for ACTION_USB_DEVICE_ATTACHED plus a <meta-data> pointing at a USB device filter resource. The <usb-device> entries should match the hardware you support (decimal VID/PIDs — Android rejects hex):
| Hardware | <usb-device> |
|---|---|
| USB CCID smart card reader | class="11" |
| IDEMIA (Morpho) MSO 1350 | vendor-id="8797" (0x225D) |
| Suprema BioMini | vendor-id="5841" (0x16D1) |
| NEXUS / Zhiang | vendor-id="8309" (0x2075) |
| NFC | not USB — handled via NfcAdapter |
Lifecycle
MBKYC is AutoCloseable — always close it:
Full API reference
Every method returnsMBKYCResult<T> (Ok/Err); call .getOrThrow() for exception semantics. Shared types (ReaderInfo, RegistrationStatus, VerificationResult, Finger, FingerSelection) are in Data types.
| Method | Returns |
|---|---|
MBKYC.create(context, baseUrl, apiKeyId, tokenSigner, logConfig, timeoutMs = 30_000, extraHeaders = emptyMap()) | MBKYCResult<MBKYC> |
listSmartcardReaders() | MBKYCResult<List<ReaderInfo>> |
listFingerprintReaders() | MBKYCResult<List<ReaderInfo>> |
registerDevice(name: String) | MBKYCResult<Unit> |
checkRegistration() | MBKYCResult<RegistrationStatus> |
validate(request: ValidationRequest) | MBKYCResult<VerificationResult> |
exportLogs(output: File) | MBKYCResult<Unit> |
close() | — (AutoCloseable) |
ValidationRequest):
tar.zst archive:
CANCELLED error.
