Android
Add the native Ansight Android SDK to a development build and initialize it from the app's Application class.
The native Android SDK exposes Kotlin-friendly APIs for Ansight telemetry, durable crash capture, host pairing, live session transport, artifacts, and remote tools.
Quickstart
Add the all-in-one package to the app module’s development configuration:
dependencies {
implementation("ai.ansight:ansight-android:1.4.0-preview.1")
}
See Android Packages when you need a core-only or individually assembled tool setup.
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()
if (BuildConfig.DEBUG) {
Ansight.initializeAndActivate(
application = this,
options = Ansight.developerOptions(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 trend-focused runs unless visual evidence is required.
Use Android Setup for the full guarded startup and CLI verification flow, Android Security before enabling remote tools, Pairing for physical-device connection, and Tools before enabling remote inspection in an app build. Review Crash Capture before retaining native crash evidence. Use File Descriptor Diagnostics or JNI Reference Diagnostics for explicit resource-leak investigations.