Bug reporting
This page documents the Bugsee Android SDK 7.x. For the previous major version, see the 6.x documentation.
Bug reports cover something that is wrong but did not crash the app. Your users can raise one with a gesture, or you can open the report dialog — or submit a report silently — from your own code. (Crashes and handled errors are covered separately, in Crash & error reporting.)
Built-in report triggers
The SDK can surface the report dialog through four built-in triggers. Each is controlled by an option, set as manifest meta-data or passed to Bugsee.launch(...). Since 7.6.0 every trigger is off by default; turn on the ones you want:
| Option | Manifest key | Default |
|---|---|---|
ReportingTriggerByShake | com.bugsee.option.reporting.triggers.shake | false |
ReportingTriggerByScreenshot | com.bugsee.option.reporting.triggers.screenshot | false |
ReportingTriggerByNotification | com.bugsee.option.reporting.triggers.notification-bar | false |
ReportingTriggerByBroadcast | com.bugsee.option.reporting.triggers.broadcast | false |
Shake and the notification-bar entry were on by default in 7.5.1 and earlier. If your app relies on either, set it to true explicitly; an app that already sets it is unaffected.
Enable the shake trigger in AndroidManifest.xml:
<meta-data
android:name="com.bugsee.option.reporting.triggers.shake"
android:value="true" />
Or override at launch time:
- Java
- Kotlin
Map<String, Serializable> options = new HashMap<>();
options.put(Options.ReportingTriggerByShake, true);
options.put(Options.ReportingTriggerByScreenshot, true);
Bugsee.launch(application, "<your-app-token>", options);
val options = HashMap<String, java.io.Serializable>()
options[Options.ReportingTriggerByShake] = true
options[Options.ReportingTriggerByScreenshot] = true
Bugsee.launch(application, "<your-app-token>", options)
Show the report dialog
Bugsee.showReportDialog(...) opens the standard reporting UI. The user can edit any pre-filled values before submitting.
static void showReportDialog();
static void showReportDialog(String summary, String description);
static void showReportDialog(String summary, String description, IssueSeverity severity);
static void showReportDialog(String summary, String description, IssueSeverity severity, ArrayList<String> labels);
- Java
- Kotlin
Bugsee.showReportDialog();
// Pre-fill summary and description; user can still edit them.
Bugsee.showReportDialog("Checkout is frozen", "The spinner never stops.");
// Pre-fill everything including severity.
Bugsee.showReportDialog(
"Checkout is frozen",
"The spinner never stops.",
IssueSeverity.Blocker);
Bugsee.showReportDialog()
// Pre-fill summary and description; user can still edit them.
Bugsee.showReportDialog("Checkout is frozen", "The spinner never stops.")
// Pre-fill everything including severity.
Bugsee.showReportDialog(
"Checkout is frozen",
"The spinner never stops.",
IssueSeverity.Blocker)
There is no severity-only overload. To set severity without pre-filling the text fields, pass null for both summary and description.
Silent upload
Bugsee.upload(...) submits a report without showing any UI. Use this when you already collected the details in your own UI.
static void upload(String summary, String description);
static void upload(String summary, String description, IssueSeverity severity);
static void upload(String summary, String description, IssueSeverity severity, List<String> labels);
static void upload(Report report);
static void upload(Report report, Callback1<Boolean> callback);
- Java
- Kotlin
Bugsee.upload("Checkout frozen", "Spinner never stops", IssueSeverity.High);
ArrayList<String> labels = new ArrayList<>();
labels.add("checkout");
Bugsee.upload("Checkout frozen", "Spinner never stops", IssueSeverity.High, labels);
Bugsee.upload("Checkout frozen", "Spinner never stops", IssueSeverity.High)
val labels = arrayListOf("checkout")
Bugsee.upload("Checkout frozen", "Spinner never stops", IssueSeverity.High, labels)
Do not call upload(...) from automated error paths. For programmatic exception reporting use Bugsee.logException(...) — this keeps traces grouped and rate-limited correctly.
Default severities
Crash, error, and bug reports get a default severity unless one is specified or set from a ReportHandler. Override via manifest:
| Option | Manifest key | Default |
|---|---|---|
ReportingDefaultCrashPriority | com.bugsee.option.reporting.defaults.crash-priority | IssueSeverity.Blocker |
ReportingDefaultErrorPriority | com.bugsee.option.reporting.defaults.error-priority | IssueSeverity.High |
ReportingDefaultBugPriority | com.bugsee.option.reporting.defaults.bug-priority | IssueSeverity.High |
Customize reports with ReportHandler
ReportHandler lets you inspect or rewrite a report before it is uploaded, and it runs for every outgoing report — crashes and handled errors included, not just the bug reports on this page. It is documented in full on its own page:
- Report handler — the two callbacks, the completion contract and its timeout, threading, behaviour during a crash, and attachments.
Programmatic report creation
When you need to build a report, customize it, and upload it on your own schedule (instead of letting showReportDialog(...) / upload(summary, ...) do it in one shot), use Bugsee.createReport(...) to obtain a Report object, mutate it, then hand it to Bugsee.upload(report).
static void createReport(ReportCreationListener listener);
ReportCreationListener has a single callback, onCreated(Report report), invoked on the main thread with the created report — or null if creation failed (for example, the SDK is not launched). The report carries a screenshot (when available) and can be used to request a video export.
The Report you receive is mutable. The most commonly used members:
setSummary(String)/setDescription(String)— the report's title and body text.setSeverity(IssueSeverity)— one ofVeryLow,Medium,High,Critical,Blocker.addLabel(String)/addLabels(List<String>)/setLabels(List<String>)/clearLabels()— dashboard labels.getAttachments()returns the currentList<Attachment>;createAndAddAttachment(name)adds a new one (see Attachments).setScreenshot(Bitmap)/setScreenshotAsync(Bitmap, Runnable)— replace the screenshot.setScreenshotencodes and writes the image on the calling thread;setScreenshotAsyncdoes it in the background and calls theRunnableonce the screenshot is stored. See Replacing the screenshot for which one to use inonCreatedand when to upload.
The same Report is what ReportHandler.onBeforeReportCreated(...) / onAfterReportCreated(...) hands you, so the same mutators apply there.
- Java
- Kotlin
Bugsee.createReport(report -> {
if (report == null) {
return; // SDK not launched, or creation failed
}
report.setSummary("Checkout frozen");
report.setSeverity(IssueSeverity.High);
report.addLabel("checkout");
Bugsee.upload(report);
});
Bugsee.createReport { report ->
report ?: return@createReport // SDK not launched, or creation failed
report.summary = "Checkout frozen"
report.severity = IssueSeverity.High
report.addLabel("checkout")
Bugsee.upload(report)
}
Replacing the screenshot
setScreenshot(Bitmap) encodes the image and writes it to disk on the calling thread. For a screen-sized bitmap that takes over 100 ms, and onCreated runs on the main thread. Use setScreenshotAsync(Bitmap, Runnable) there, and upload the report from its callback:
setScreenshotAsyncreturns before the screenshot is stored, and calls the callback once it is.- A report uploaded before that can be sent without the new screenshot, so do not call
Bugsee.upload(report)right aftersetScreenshotAsync. - The callback runs on the thread that called
setScreenshotAsyncwhen that thread has aLooper(here, the main thread), otherwise on the main thread. - The SDK reads the bitmap on a background thread after the call returns, and does not copy it, so do not recycle or change the bitmap until the callback runs. The report neither keeps nor recycles it: after the callback the bitmap is yours again.
- Java
- Kotlin
Bugsee.createReport(report -> {
if (report == null) {
return; // SDK not launched, or creation failed
}
Bitmap bitmap = renderCheckoutScreen(); // a Bitmap your app produces
report.setSummary("Checkout frozen");
report.setScreenshotAsync(bitmap, () -> Bugsee.upload(report));
});
Bugsee.createReport { report ->
report ?: return@createReport // SDK not launched, or creation failed
val bitmap = renderCheckoutScreen() // a Bitmap your app produces
report.summary = "Checkout frozen"
report.setScreenshotAsync(bitmap) { Bugsee.upload(report) }
}
Severity values
IssueSeverity values: VeryLow, Medium, High, Critical, Blocker. See the configuration reference — Enums for each value's meaning.