Nosmai  Effects Nosmai  Moderation Nosmai Try-ons coming soon
Docs menu Android
How-to guide

Install on Android

Add the verified 3.0.4 AAR to an Android project and confirm its API, Java, permission, and ARM64 requirements.

Platform Android SDK version 3.0.4 Updated Aug 22, 2026 Time 10 min

Prerequisites

  • An Android application with minimum API 21 or later
  • Android compile SDK 35 for the current integration baseline
  • Java 11 bytecode compatibility
  • A physical device whose ABI list contains arm64-v8a
  • A Nosmai licence key bound to the application ID

Download and verify the AAR

Create the application library directory:

mkdir -p app/libs

Download the native release and checksums from the official Android v3.0.4 release:

curl -L \
  -o app/libs/nosmai-sdk-3.0.4.aar \
  https://github.com/nosmai/nosmai_effects_sdk_android/releases/download/v3.0.4/nosmai-sdk-3.0.4.aar

curl -L \
  -o SHA256SUMS \
  https://github.com/nosmai/nosmai_effects_sdk_android/releases/download/v3.0.4/SHA256SUMS

Verify the release:

shasum -a 256 -c SHA256SUMS

The expected AAR SHA-256 is:

4804fc5bf502ca7aff46285562b8d0318d7d14f6ada8a9cb3112fc2188804284

Do not rename or use an artifact that fails verification.

Configure the app module

For Kotlin DSL:

android {
    compileSdk = 35

    defaultConfig {
        minSdk = 21

        ndk {
            abiFilters += listOf("arm64-v8a")
        }
    }

    compileOptions {
        sourceCompatibility = JavaVersion.VERSION_11
        targetCompatibility = JavaVersion.VERSION_11
    }
}

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

For Groovy DSL:

android {
  compileSdkVersion 35

  defaultConfig {
    minSdkVersion 21
    ndk {
      abiFilters 'arm64-v8a'
    }
  }

  compileOptions {
    sourceCompatibility JavaVersion.VERSION_11
    targetCompatibility JavaVersion.VERSION_11
  }
}

dependencies {
  implementation files('libs/nosmai-sdk-3.0.4.aar')
}

The AAR contains consumer R8 rules for the public API, JNI entry points, frame callbacks, and cloud response types. Keep the app's normal release minification configuration and inspect the merged rules when adding custom shrinking rules.

Add Android permissions

<manifest xmlns:android="http://schemas.android.com/apk/res/android">
    <uses-permission android:name="android.permission.CAMERA" />
    <uses-permission android:name="android.permission.INTERNET" />
    <uses-permission android:name="android.permission.RECORD_AUDIO" />

    <application
        android:allowBackup="true"
        android:label="CameraApp"
        android:theme="@style/Theme.CameraApp" />
</manifest>

Request CAMERA at runtime before opening Camera2. Request RECORD_AUDIO only before recording audio. Internet access is used for licence verification and Cloud Filters.

Confirm the device ABI

Connect the device and run:

adb shell getprop ro.product.cpu.abilist

The result must contain arm64-v8a. It is valid for the list to contain 32-bit fallback ABIs as well. A 32-bit-only device cannot install this release.

AAR size

The 3.0.4 AAR is 53,876,984 bytes, about 51.4 MiB. This is not the final Play Store download increase. App Bundle ABI delivery, compression, existing shared dependencies, symbols, and bundled .nosmai assets affect the result.

Build a signed release App Bundle and inspect its device-specific download size in Play Console before publishing.

Verify it worked

Add a version log after application startup:

import android.util.Log;
import com.nosmai.effect.api.NosmaiSDK;

Log.i("CameraApp", "Nosmai version: " + NosmaiSDK.getVersion());

Build and install on an ARM64 device. A successful launch with version 3.0.4 confirms Java classes and native libraries are packaged. Continue to the Android quickstart to initialize, connect Camera2, and apply skin smoothing.

Common errors

ErrorCauseFix
Could not find com.nosmai or package com.nosmai.effect.api does not existApp module does not reference the AAR pathPut the verified file in app/libs and add implementation(files("libs/nosmai-sdk-3.0.4.aar"))
INSTALL_FAILED_NO_MATCHING_ABISDevice or build does not support arm64-v8aUse an ARM64 physical device and retain the ABI filter
UnsatisfiedLinkErrorAAR is missing, corrupted, duplicated, or stripped incorrectlyVerify SHA-256, keep one AAR copy, and inspect the packaged native libraries
License key cannot be null or emptyBuild configuration did not supply the licence keyProvide the app-bound key before NosmaiSDK.initialize
Cleartext HTTP traffic not permittedApp is loading a development asset over HTTPUse HTTPS or an explicit development-only network security configuration

Next steps

References

Was this page helpful?

Your response helps us prioritize documentation improvements.

Nosmai

An AR and AI company. Founded on the idea that the next decade of software will be visual, and that the tools for it should be within reach of anyone building.

Newsletter

Product updates and release notes. No spam.

© 2026 nosmai, inc · all rights reserved