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.
- Download the latest
nosmai-detection.aarfrom the releases page. - Put it in your app module’s
libs/folder (e.g.app/libs/nosmai-detection.aar). - 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 INTERNETpermission (license check);CAMERAfor live moderation- CameraX, only for the live-camera path
- Distribute as an App Bundle (AAB) — the SDK ships
arm64-v8aonly, 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.