BugScreenSDK

Main SDK class for BugScreen

Initialize in your Application class:

class MyApp : Application() {
override fun onCreate() {
super.onCreate()
BugScreenSDK.start(
BugScreenConfig.Builder(this)
.apiKey("fb_your_api_key")
.enableScreenshotDetection(true)
.enableLogging(BuildConfig.DEBUG)
.build()
)
}
}

Properties

Link copied to clipboard

Check if SDK is initialized

Functions

Link copied to clipboard

Get the permission string required for screenshot detection on this device.

Link copied to clipboard

Check if the app has the required permission for screenshot detection.

Link copied to clipboard
fun log(level: LogLevel, message: String)

Log a message that will be included in bug reports. Logs are stored in memory (max 1MB) and sent with bug report submissions.

Link copied to clipboard
fun openBugReportScreen(context: Context, screenshotUri: String? = null)

Open the bug report screen

Link copied to clipboard
fun requestScreenshotPermission(activity: Activity, callback: (granted: Boolean) -> Unit)

Request the screenshot detection permission from the user.

Link copied to clipboard

Check if the app should request screenshot detection permission from the user.

Link copied to clipboard
fun shutdown()

Shutdown the SDK and release resources

Link copied to clipboard
fun start(config: BugScreenConfig)

Start the SDK with the given configuration