Platform SDKs / Android (Kotlin)

Android (Kotlin)

Install and configure the Nosmai SDK in a native Android app.

Install

The SDK ships as a self-contained AAR — everything runs on-device and all models are bundled, so there are no extra dependencies to add.

  1. Download the latest nosmai-detection.aar from the releases page.
  2. Put it in your app module’s libs/ folder (e.g. app/libs/nosmai-detection.aar).
  3. Reference it in Gradle:
android {
  defaultConfig {
    minSdk = 24
    ndk { abiFilters += "arm64-v8a" }
  }
}

dependencies {
  implementation(files("libs/nosmai-detection.aar"))
}

Configure

Initialize once with your license key, off the main thread — it verifies the key online (cached 24h, +24h offline grace) and loads the models.

import com.nosmai.detection.NosmaiSDK

Executors.newSingleThreadExecutor().execute {
  val ok = NosmaiSDK.init(context, "NOSMAI-XXXX")
}

Requirements

  • Android API 24 (7.0) or later, arm64-v8a
  • INTERNET permission (license check); CAMERA for live moderation
  • CameraX, only for the live-camera path
  • Distribute as an App Bundle (AAB) — the SDK ships arm64-v8a only, so Play hides it from 32-bit-only devices, and it won’t run on x86_64 emulators

NOTE

Next: Moderation · Android — image, video, text and live usage.

Nosmai

We make advanced camera and AI technology accessible to every developer. By packaging hard problems into simple

developers
legal
newsletter

Product updates and release notes. No spam.

© 2026 nosmai, inc · all rights reserved