Android Setup Packages
Install the native Android SDK packages and initialize the all-in-one or core runtime.
Use ai.ansight:ansight-android for local development builds. Use the core and individual tool packages only when you need a narrower runtime surface.
Published Android packages are available on Maven Central through Sonatype Central:
| Package | Registry |
|---|---|
ai.ansight:ansight-android | Maven Central |
ai.ansight:ansight-core-android | Maven Central |
ai.ansight:ansight-pairing-android | Maven Central |
ai.ansight:ansight-tools-visualtree-android | Maven Central |
ai.ansight:ansight-tools-filesystem-android | Maven Central |
ai.ansight:ansight-tools-preferences-android | Maven Central |
ai.ansight:ansight-tools-securestorage-android | Maven Central |
ai.ansight:ansight-tools-database-android | Maven Central |
ai.ansight:ansight-tools-reflection-android | Maven Central |
Kotlin DSL
dependencies {
implementation("ai.ansight:ansight-android:1.0.2-preview.1")
}
Groovy
dependencies {
implementation 'ai.ansight:ansight-android:1.0.2-preview.1'
}
Minimal Package Set
dependencies {
implementation("ai.ansight:ansight-core-android:1.0.2-preview.1")
implementation("ai.ansight:ansight-pairing-android:1.0.2-preview.1")
implementation("ai.ansight:ansight-tools-visualtree-android:1.0.2-preview.1")
}
All-In-One Setup
Initialize from your app’s Application subclass, normally
app/src/main/java/<your-package>/MyApplication.kt or .java, inside
onCreate() after super.onCreate(). Register the class in
AndroidManifest.xml with android:name=".MyApplication" if the app does not
already have a custom Application.
Keep MainActivity for app-owned pairing UI, QR scanning, or other flows that
need an Activity. Runtime initialization should live in
Application.onCreate() so capture, telemetry, lifecycle hooks, and tools are
available before the first activity is shown.
import ai.ansight.Ansight
import android.app.Application
class MyApplication : Application() {
override fun onCreate() {
super.onCreate()
Ansight.initializeAndActivateDeveloperMode(
application = this,
bundledDeveloperConfigJson = BuildConfig.ANSIGHT_DEVELOPER_PAIRING_JSON,
clientName = "Android App",
)
}
}
initializeAndActivateDeveloperMode(...) is the supported shortcut for the native Android developer preset.
Important: The developer preset enables session JPEG capture. Screen capture will result in an FPS drop while frames are captured, encoded, and transported. Disable session JPEG capture for performance-focused runs unless visual evidence is required.
Core-Only Setup
Core-only initialization belongs in the same Application.onCreate() startup
location:
import ai.ansight.runtime.AnsightOptions
import ai.ansight.runtime.AnsightRuntime
AnsightRuntime.initializeAndActivate(
application = application,
options = AnsightOptions(
sampleFrequencyMilliseconds = 500,
retentionPeriodSeconds = 600,
),
)
Core defaults keep the tool guard disabled. Register tool packages explicitly and choose a guard before expecting tools to be discoverable.
Do not ship developer pairing JSON or broad remote tools in Play Store, CI release, or other distributable builds.