Android SDK

The Android SDK is the primary runtime integration for Snapbug.

Use it to stream inspection data from your app into the Chrome Extension, the optional local service flow, or the legacy Desktop transport.

Install

Add the core runtime in debug and the no-op twin in release:

dependencies {
    debugImplementation("ai.snapbug:snapbug:1.0.0")
    releaseImplementation("ai.snapbug:snapbug-no-op:1.0.0")
}

If you use a version catalog:

[versions]
snapbug = "1.0.0"
 
[libraries]
snapbug = { module = "ai.snapbug:snapbug", version.ref = "snapbug" }
snapbug-no-op = { module = "ai.snapbug:snapbug-no-op", version.ref = "snapbug" }

Start the SDK

Initialize Snapbug once, usually in your Application:

class App : Application() {
    override fun onCreate() {
        super.onCreate()
        Snapbug.start(this)
    }
}

This one line enables the default plugin set.

Optional configuration

You can customize the integration with the DSL:

Snapbug.start(this) {
    crashReporter { catchFatalErrors = true }
    database { room() }
    debugFeedback { screenNameProvider = { currentScreenName } }
}

Connection modes

Recommended: Chrome Extension

Use room-code pairing and WebRTC transport. This is the main onboarding path for new users.

Optional: local service

Run snapbug serve if you need AI workflows from the extension.

Legacy: localhost/Desktop

Older setups can still connect to local ports 9023 and 9024.

Network security

If you use the legacy localhost path on Android 9+, allow cleartext traffic to localhost and 127.0.0.1.

The Chrome Extension WebRTC path does not need this configuration.

Common plugin modules

Depending on your use case, you may also add more focused artifacts such as:

  • network interceptors
  • crash reporter
  • analytics
  • database support
  • debug feedback

When a runtime artifact has a no-op pair, keep the debug/release swap symmetrical.

Next docs