Android
Choose the native Android SDK package, initialize the runtime, and branch into pairing, telemetry, JPEG capture, touch input, artifacts, and remote tools.
The native Android SDK exposes Kotlin-friendly APIs for Ansight telemetry, host pairing, live session transport, artifacts, and remote tools.
Packages
| Package | Registry | Purpose |
|---|---|---|
ai.ansight:ansight-android | Maven Central | All-in-one developer package. Includes core, pairing, and standard native tool suites. |
ai.ansight:ansight-core-android | Maven Central | Runtime, telemetry, host connection, tools, and artifact abstractions. |
ai.ansight:ansight-pairing-android | Maven Central | Native Android pairing UI. |
ai.ansight:ansight-tools-visualtree-android | Maven Central | Android view hierarchy, screenshot, and overlay tools. |
ai.ansight:ansight-tools-filesystem-android | Maven Central | Sandboxed file-system tools. |
ai.ansight:ansight-tools-preferences-android | Maven Central | SharedPreferences tools. |
ai.ansight:ansight-tools-securestorage-android | Maven Central | Allow-listed secure-storage tools. |
ai.ansight:ansight-tools-database-android | Maven Central | SQLite discovery, schema, and query tools. |
ai.ansight:ansight-tools-reflection-android | Maven Central | Explicit-root reflection tools. |
Quickstart
Put this code in your app’s Application subclass, usually
app/src/main/java/<your-package>/MyApplication.kt, inside onCreate() after
super.onCreate(). Register the class with
android:name=".MyApplication" in AndroidManifest.xml. Keep MainActivity
for UI and pairing flows that need an activity.
import ai.ansight.Ansight
import android.app.Application
class MyApplication : Application() {
override fun onCreate() {
super.onCreate()
Ansight.initializeAndActivate(
application = this,
options = Ansight.developerOptions(
bundledDeveloperConfigJson = BuildConfig.ANSIGHT_DEVELOPER_PAIRING_JSON,
clientName = "Android App",
),
)
}
}
Ansight.developerOptions(...) applies the Android all-in-one developer preset: 400 ms sampling, 120 s retention, FPS, touch capture, JPEG capture every 2000 ms at quality 60 and max width 480, host auto-probe, full tool access, and all standard native tools.
Important: Screen capture will result in an FPS drop while the SDK captures, encodes, and transports frames. Disable session JPEG capture for performance-focused runs unless visual evidence is required.
Use Setup Packages for install details, Android Security before enabling remote tools, Pairing for host connection, and Tools before enabling remote inspection in an app build.