mbkyc-kotlin-desktop— Kotlin, suspend functions + coroutines.mbkyc-java-desktop— pure Java, no Kotlin runtime; every operation returns aCompletableFuture.
Kotlin example
A self-contained coroutine CLI. Fill in the config block and
./gradlew run.Java example
The
CompletableFuture equivalent. Fill in the config block and ./gradlew run.To read a card or capture a fingerprint, install the matching desktop service first —
mbkyc-pcsc-service for card readers and your fingerprint vendor’s service. Without them, the reader lists return empty. Manual entry needs no services.Kotlin desktop
Install
Use
context parameter and without EmiratesIdNfc.
Java desktop
- Group:
ae.gov.icp.mbkyc - Artifact:
mbkyc-java-desktop - Java: 11+
Install
Use
Every call returnsCompletableFuture<MBKYCResult<T>>. Use .join()/.get() to block, or thenApply/thenCompose for non-blocking flows.
In the Java SDK the token signer and recommendation handlers are ordinary blocking methods invoked on background threads under a timeout.
MBKYCResult is Ok/Err — use isOk(), getOrNull(), getOrThrow(), errorOrNull(), map/flatMap.
Full API reference
The two desktop packages expose the same operations over the same data types — only the async wrapper differs.Validation requests by document
Pick the request type for the document you’re verifying. The type names are the same in Kotlin and Java — only the construction syntax differs (Kotlin named args vs. Javanew).
- Emirates ID
- Passport
Manual entry — no hardware required. Construct
EmiratesIdManual.Card read — needs a smart card reader + the mbkyc-pcsc-service desktop service. Construct EmiratesIdCard with a readerId from listSmartcardReaders().+ Fingerprint — attach a Fingerprint argument to either Emirates ID request above (needs a fingerprint sensor + its service; get the readerId from listFingerprintReaders()).Desktop has noCancel by cancelling the coroutine (Kotlin) or thecontextparameter and noEmiratesIdNfc. The Kotlin request types match Android; the Java equivalents areEmiratesIdCard,EmiratesIdManual,PassportManual, andFingerprintconstructors.
CompletableFuture (Java).
