Android SDK
Same dashboard and API as the web SDKs. The Android SDK collects device signals with a public key and returns aneventId. Your backend verifies with a secret key.
Requirements
- Min SDK 21, Target SDK 36
- Kotlin 1.9+ (Java 11 bytecode)
- Internet access on device
Install
Maven Central:com.keverd:fraud-sdk coordinates when configured.
API keys
Use a public key only (kv_pk_test_… / kv_pk_live_…).
Get keys at dashboard.keverd.com → Integrate → API keys. See API keys.
Permissions
Merged from the library manifest:Initialize
Call once — typically inApplication.onCreate:
Config
Consent
WhenconsentRequired = true (default):
getVisitorData() fails with KeverdError.Code.CONSENT_REQUIRED (or returns Result.ConsentRequired on the callback API).
Collect
Kotlin (suspend)
Callback (Java-friendly)
getVisitorData() calls POST /v2/fingerprint with header X-API-Key (and X-SDK-Source: android).
Response (VisitorData)
Send the event id to your backend:
{ "event_id": "…" } using a secret key. See Server SDKs.
There is no separate
getVisitorId() API. Use VisitorData.visitorId after getVisitorData().Login verification (collect with login context)
Attaches login context to the collect request (POST /fingerprint/verify/login). This still uses the public key and does not replace server verify().
LoginIdentifierHash.fromIdentifier(identifier) produces sha256:<hex> of the lowercased identifier (optional salt). Never send raw emails/phones as the hash input if your policy forbids it — hash client-side first.
LoginContext
Behavioral signals (optional)
Improve signal quality by attaching listeners on screens where users interact:Preview signals (debug)
getVisitorData().
Errors
Suspend APIs throwKeverdError. The callback API returns Result.Error(KeverdError).
ProGuard / R8
The published AAR ships consumer ProGuard rules that keep the public SDK surface (Keverd, Config, VisitorData, Result*, KeverdError, Action, verify types, and API DTOs). Extra keep rules are usually unnecessary.
Deprecated API
KeverdFingerprint.init / submit(...) remains as a thin 1.0.x migration wrapper. Prefer:
End-to-end flow
- App calls
Keverd.getVisitorData()withkv_pk_… - App sends
eventIdto your backend - Backend calls POST /v2/verify with
kv_sk_…and{ "event_id": "…" } - Enforce returned
action:allow|soft_challenge|hard_challenge|block

