VerifyAI Android Native SDK

Add AI-powered photo verification to your Android app with a Kotlin-first API. On-device TFLite inference, CameraX-based scanner, and full offline support.

Quick Start

1. Install

kotlin
// settings.gradle.kts
dependencyResolutionManagement {
  repositories {
    google()
    mavenCentral()
    maven { url = uri("https://maven.switchlabs.dev/releases") }
  }
}

// app/build.gradle.kts
dependencies {
  implementation("dev.switchlabs.verifyai:verifyai-android:1.0.0")
}

2. Use

kotlin
import dev.switchlabs.verifyai.VerifyAIClient
import dev.switchlabs.verifyai.Policy

val client = VerifyAIClient.builder(this)
  .apiKey("vi_live_...")
  .build()

// In an activity or fragment scope:
lifecycleScope.launch {
  val result = client.presentScanner(
    activity = this@MyActivity,
    policy = Policy.SCOOTER_PARKING,
    metadata = mapOf("trip_id" to "TR-1234")
  )

  when (result) {
    is VerificationResult.Compliant -> {
      Log.d("VerifyAI", "Verified: ${result.verificationId}")
    }
    is VerificationResult.NonCompliant -> {
      Log.d("VerifyAI", "Issue: ${result.feedback}")
    }
    is VerificationResult.Error -> {
      Log.e("VerifyAI", "Error", result.error)
    }
  }
}

Features

Kotlin-First API

Coroutines, sealed result types, Flow-based streaming — idiomatic Kotlin that fits modern Android codebases.

TFLite + NNAPI

On-device inference via TensorFlow Lite, accelerated through NNAPI and GPU delegates on supported devices.

Jetpack Compose + Views

Compose composable (VerifyAIScanner) and a classic Activity / Fragment scanner. Choose whichever matches your codebase.

CameraX Under the Hood

Built on CameraX so you get consistent capture quality across the Android device fragmentation landscape.

Offline Queue + WorkManager

Verifications queue with WorkManager when offline and sync reliably across process death and network changes.

Privacy First

Capture quality checks and inference run fully on-device. Only validated images leave the user's phone.

Code Examples

Requirements

  • Android minSdk 24 (Android 7.0) or later
  • Kotlin 1.8 or later
  • AGP 8.0 or later
  • Camera permission declared in AndroidManifest.xml
  • VerifyAI API key (free sandbox available)

Frequently Asked Questions

Ship Photo Verification on Android

Kotlin-native, TFLite-powered, production-ready. Start your free sandbox today.

Get in Touch

Questions about pricing, integrations, or custom deployments? We'd love to hear from you.