Welcome to Instabug's Documentation!
Here you'll find a comprehensive technical guide
to help you start working with the Instabug SDK efficiently.

Get Started

Event Handlers

Covered here are event handlers that you can use to have a block of code executed when a certain action is triggered.

Before Invoking Instabug

This block is executed on the UI thread. You can use it to perform any UI changes before the SDK's UI is shown.

BugReporting.OnInvokeHandler(function () {
    // Perform any UI changes before the SDK's UI is shown.
});

Before Sending a Report

This block is executed in the background before sending each report. You can use it to attach logs and extra data to reports.

BugReporting.onReportSubmitHandler(function () {
    // Attach logs and extra data to reports.
});

After Dismissing Instabug

This block is executed on the UI thread. You can use it to perform any UI changes after the SDK's UI has been dismissed.

BugReporting.onSDKDismissedHandler(function (dismissType, reportType) {
    // Perform any UI changes after the SDK's UI has been dismissed.
});

The onSDKDismissedHandler block has the following parameters:

  • dismissType: How the SDK was dismissed.
  • reportType: The type of report that was sent. If the SDK was dismissed without selecting a report type, it will be set to bug, so you might need to check issueState before reportType.

Updated 12 months ago


What's Next

Check out our attachments section for details on how to attach your own file. You can even attach a file in one of the handlers above! You can also set custom data, such as a user attribute, at any time, including inside event handlers. Logging user events in the event handlers is possible as well.

Attachments
Setting Custom Data
Report Logs

Event Handlers


Covered here are event handlers that you can use to have a block of code executed when a certain action is triggered.

Suggested Edits are limited on API Reference Pages

You can only suggest edits to Markdown body content, but not to the API spec.