HomeDocsAndroid

Setup

v1.9.0

Install and initialize the SDK for your testers.

Sample app

BugScreen Travel is a small Jetpack Compose app that wires up every integration point, with the debugImplementation + no-op release split.

View on GitHub

Installation

Add the dependency to your module's build.gradle.kts:

build.gradle.kts
kotlin
dependencies {
    implementation("app.bugscreen:android:1.9.0")
}

Requires Android 7.0+ (API 24) and Kotlin 2.0+.

Get your SDK API key

  1. Open Apps in the console. Select your app, or choose New app and then Create app.
  2. Open the SDK tab. An organisation admin can select Reveal beside SDK API key and copy the key.
  3. Replace fb_your_api_key_here in the initialization example below with that key.
Open the console

Setup

BugScreen is for dev/QA — gate BugScreenSDK.start(...) in your Application class so it doesn't run for end users. Pick one:

Tester-flag guard

Runs on production builds for users you flag as testers — useful for dogfooding.

MyApp.kt
kotlin
import android.app.Application
import app.bugscreen.android.BugScreenConfig
import app.bugscreen.android.BugScreenSDK

class MyApp : Application() {
    override fun onCreate() {
        super.onCreate()

        // User.isTester() is pseudocode — replace with your tester signal.
        if (User.isTester()) {
            BugScreenSDK.start(
                BugScreenConfig.Builder(this)
                    .apiKey("fb_your_api_key_here")
                    .screenshotDetection(true)
                    .requestPermissionsOnStart(true)
                    .build()
            )
        }
    }
}

debugImplementation + no-op

Only the no-op stub ships in your release APK. Pair the real SDK on debug with app.bugscreen:android-no-op on release; both expose the same API so your Application class compiles unchanged.

build.gradle.kts
kotlin
dependencies {
    debugImplementation("app.bugscreen:android:1.9.0")
    releaseImplementation("app.bugscreen:android-no-op:1.9.0")
}

Then call BugScreenSDK.start(...) from your Application class with no guard — release builds resolve the no-op and do nothing.

MyApp.kt
kotlin
import android.app.Application
import app.bugscreen.android.BugScreenConfig
import app.bugscreen.android.BugScreenSDK

class MyApp : Application() {
    override fun onCreate() {
        super.onCreate()

        BugScreenSDK.start(
            BugScreenConfig.Builder(this)
                .apiKey("fb_your_api_key_here")
                .screenshotDetection(true)
                .requestPermissionsOnStart(true)
                .build()
        )
    }
}

Configure screenshot permissions and send your first screenshot report.

Usage

Configuration

Use BugScreen from your assistant with the MCP setup guide.