Silent reports

This page explains how to submit yourself a bug report from the background, without interrupting your end user whatsoever.

Overview

You can send silent reports to yourself by calling the Shake.silentReport() method anywhere after Shake.start(), as shown below:

App.kt
Shake.silentReport(
description: String,
reportData: ShakeReportData,
configuration: ShakeReportConfiguration
)

This method allows you to include: Attachments, Metadata, Activity history and a screenshot in your silent report. If you decide to do so, your code should look something like this example:

App.kt
fun example() {
val configuration = ShakeReportConfiguration()
configuration.blackBoxData = true
configuration.activityHistoryData = true
configuration.screenshot = true
Shake.silentReport("description", createShakeReportData(), configuration)
Shake.setMetadata("key", "value")
}
private fun createShakeReportData(): ShakeReportData {
return object : ShakeReportData {
/* From SDK Version 12.0 Quick facts are deprecated, so they're set to
return null in this code example. */
override fun quickFacts(): String {
return null
}
override fun attachedFiles(): List<ShakeFile> {
return ArrayList()
}
}
}

Show the Bug submitted message

Silent reports are programmatic and no Shake UI is shown. However, you can choose to display a small and non-intrusive message saying Done. Bug submitted successfully. on the bottom of a users screen once the report has been submitted:

App.kt
val configuration = ShakeReportConfiguration()
configuration.showReportSentMessage = true