autentikar
Android

Quick Start

Integrate and start Autentikar SDK in a native Android application.

Requirements

  • Android 7.0 or later (minimum API level 24)
  • Android Gradle Plugin 8.7.3 or later
  • Kotlin Gradle plugin 1.9.24 or later
  • An existing Android project
  • Autentikar credentials and private Maven repository access
  • Your application's applicationId registered with Autentikar
  • A code obtained from the Autentikar start endpoint

If your applicationId is not registered, contact [email protected].

Permissions

Add the required permissions to AndroidManifest.xml:

AndroidManifest.xml
<uses-permission android:name="android.permission.ACCESS_NETWORK_STATE" />
<uses-permission android:name="android.permission.ACCESS_WIFI_STATE" />
<uses-permission android:name="android.permission.INTERNET" />
<uses-permission android:name="android.permission.CAMERA" />

Configure the private Maven repository

Add the Autentikar repository to your project repository configuration. The ACCESS_KEY and SECRET_KEY values are provided separately by Autentikar.

build.gradle
allprojects {
    repositories {
        google()
        mavenCentral()
        maven {
            url "s3://maven.autentikar.s3.amazonaws.com"
            credentials(AwsCredentials) {
                accessKey ACCESS_KEY
                secretKey SECRET_KEY
            }
        }
    }
}
Keep the Maven credentials outside source control. Load them from a local or CI secret store instead of committing them to the repository.

Add the modules

Core is mandatory. Add PhotoIDScan and UnifiedID only when the registered flow uses their steps. Use the current versions listed on each dependency page.

build.gradle
implementation "com.autentikar:core-v2:x.x.x"
implementation "com.autentikar:photoidscan:x.x.x"
implementation "com.autentikar:unifiedid:x.x.x"

Core

Required orchestration and server communication.

UnifiedID

Optional FaceTec liveness and ID capture.

PhotoIDScan

Optional native ID-card capture.

Register the flow steps

Register only the contracts required by your flow, normally during application startup:

MainActivity.kt
AutentikarManager.register(
    AutentikarPhotoIDScanManager.setContract(AutentikarStepType.CARD_CAPTURE)
)
AutentikarManager.register(
    AutentikarUnifiedIDManager.setContract(AutentikarStepType.FACETEC_LIVENESS)
)
AutentikarManager.register(
    AutentikarUnifiedIDManager.setContract(AutentikarStepType.FACE_FACETEC)
)

Configure the SDK

Set the alias assigned by Autentikar. Production is the default stage; set it explicitly when you want the configuration to be sandbox.

MainActivity.kt
AutentikarConfiguration.alias = "test"
AutentikarConfiguration.stage = AutentikarStageType.PRODUCTION

The stage selects the service URL used by the SDK.

Start the flow

Pass the launcher, the current Activity, and the code returned when the flow was created:

MainActivity.kt
AutentikarManager.start(
    autentikarResultLauncher,
    context = this,
    code = "j-C5eB0dkVk"
) { error ->
    // The SDK could not start. Present or log the error.
}

The result launcher reports whether the SDK lifecycle finished successfully or failed. The start error callback is reserved for failures that prevent the flow from beginning.

Handle the result

Create an Activity Result launcher so the result remains tied to the Activity lifecycle:

RegisterForActivityResult only indicates that the instance has finished its lifecycle; to obtain the result of the instance, use the status endpoint.
MainActivity.kt
private val autentikarResultLauncher =
    registerForActivityResult(AutentikarResultContract()) { result ->
        when (result) {
            AutentikarResultType.SUCCESS -> {
                println("Success")
            }
            AutentikarResultType.FAILED -> {
                // Handle failure
            }
        }
    }

Customize the experience

All UI-bearing modules can be adapted to your application's branding. Continue with UI customization.

Copyright © 2026