Skip to content
SDKs

Android SDK

A native verification flow built entirely on Jetpack Compose. Add one dependency, launch the flow with a config and a listener, and receive a typed decision — the API mirrors the Web and iOS SDKs.

github.com/Othento/android-sdk →

Requirements

  • minSdk 24, compileSdk 34
  • Kotlin 2.0, Java 17
  • Jetpack Compose

Install

Add the dependency to your app module:

build.gradle.kts
// build.gradle.kts (app module)
dependencies {
    implementation("com.othento:othento-core:0.1.0")
}

Permissions

The SDK merges the permissions it needs into your app, and requests camera access at runtime on the capture screen — you do not need to add them manually:

AndroidManifest.xml
<!-- Merged automatically from the SDK manifest -->
<uses-permission android:name="android.permission.INTERNET" />
<uses-permission android:name="android.permission.CAMERA" />

Launch a verification

Build a config and call OthentoSDK.launch(activity, config, listener). The convenience launch constructs and starts in one call; you can also construct OthentoSDK(activity, config, listener) and call start() yourself.

VerifyActivity.kt
import com.othento.core.api.*

val config = OthentoConfig.Builder()
    .create(workflowExternalId = "wf_onboarding", clientData = "user-123")
    .apiKey("pk_sandbox_•••")
    .build()

OthentoSDK.launch(this, config, object : OthentoSDKListener {
    override fun onCompleted(decision: OthentoDecision, externalId: String) {
        Log.d("Othento", decision.name) // Approved | Declined | InReview
    }
    override fun onCancelled(reason: OthentoCancelReason) {}
    override fun onError(error: OthentoError, displayMessage: String) {}
    override fun onReady() {}
    override fun onSessionCreated(externalId: String, sessionUrl: String) {}
    override fun onStatusChanged(status: OthentoSessionStatus) {}
})

Configuration & lifecycle

OthentoConfig.Builder validates at build() and throws on a missing required field. The required create-mode inputs are workflowExternalId, clientData and apiKey; optional methods include expectedDetails, callbackUrl, callbackReceiver, metadata, closeOnComplete and loggingEnabled. For production, use tokenMode(sat) to keep keys off the device.

OthentoSDKListener delivers onReady, onSessionCreated, onStatusChanged and exactly one terminal callback — onCompleted, onCancelled or onError. See the API reference for every option, enum and error code.