Bug Reporting
This page covers some APIs specific for Unity bug reporting.
We're covering bug reporting in this page. However, in the Reports Data section, you can find more information about the data sent with each bug report.
SDK Events
Before Showing the SDK
This block is executed on the UI thread. Could be used for performing any UI changes before the SDK's UI is shown.
[MonoPInvokeCallback(typeof(Instabug.PreInvocationCallbackDelegate))]
public static void PreInvocationCallback() {
// Perform any UI changes in this block before the SDK's UI is shown.
Debug.Log("Pre Invocation Callback!");
}
Instabug.SetPreInvocationHandler(PreInvocationCallback);
Before Sending a Report
This block is executed in the background before sending each report. Could be used for attaching logs and extra data to reports.
[MonoPInvokeCallback(typeof(Instabug.PreSendingCallbackDelegate))]
public static void PreSendingCallback() {
// Attach logs and extra data to reports in this block.
Debug.Log("Pre Sending Callback!");
}
Instabug.SetPreSendingHandler(PreSendingCallback);
After the SDK Has Been Dismissed
This block is executed on the UI thread. Could be used for performing any UI changes after the SDK's UI has been dismissed.
[MonoPInvokeCallback(typeof(Instabug.PostInvocationCallbackDelegate))]
public static void PostInvocationCallback(Instabug.IBGDismissType dismissType, Instabug.IBGReportType reportType) {
// Perform any UI changes in this block after the SDK's UI has been dismissed.
Debug.Log("Dismiss Type: "+ dismissType + "Report Type: " + reportType);
}
Instabug.SetPostInvocationHandler(PostInvocationCallback);
The postInvocationHandler
block has the following parameters:
dismissType
: How the SDK was dismissed.reportType
: Type of report that has been sent. Will be set tobug
in case the SDK has been dismissed without selecting a report type, so you might need to check issueState before reportType.
Updated almost 3 years ago