Eid Kit
object EidKit
Main entry point for the EidKit SDK.
Setup
Call configure once at application startup — typically in Application.onCreate():
class MyApp : Application() {
override fun onCreate() {
super.onCreate()
EidKit.configure(this, EidKitConfig {
// all fields optional — safe defaults apply
tracerProvider = myOtelSdk.tracerProvider
licenseToken = BuildConfig.EIDKIT_LICENSE_TOKEN
})
}
}Content copied to clipboard
NFC lifecycle
Attach nfcManager to your Activity to receive card tap events:
class MyActivity : ComponentActivity() {
private val nfcManager = EidKit.nfcManager()
override fun onResume() { super.onResume(); nfcManager.enableForegroundDispatch(this) }
override fun onPause() { super.onPause(); nfcManager.disableForegroundDispatch(this) }
override fun onNewIntent(intent: Intent) {
super.onNewIntent(intent)
val isoDep = nfcManager.handleIntent(intent) ?: return
lifecycleScope.launch {
val result = EidKit.reader(can = userEnteredCan)
.withPersonalData(pin = userEnteredPin)
.withActiveAuth()
.read(isoDep)
}
}
}Content copied to clipboard
CAN requirement
All sessions require the Card Access Number (CAN) — the 6-digit number printed on the front of the Romanian CEI card. The CAN must be provided by the card holder at runtime. Never hardcode or store a CAN.
Functions
Link copied to clipboard
Configure the SDK. Must be called before any session is started.
Link copied to clipboard
Returns an NfcManager for managing NFC foreground dispatch in your Activity. The returned instance is stateless — sharing it or creating a new one per call is fine.