Bug Reporting Event Handlers for Cordova
Covered here are event handlers that you can use to have a block of code executed when a certain action is triggered for your Cordova apps.
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.setOnInvokeHandler(
function () {
console.log('SDK Invoked');
},
function (error) {
console.log('On Invoke handler could not be set ' + error);
}
);
After Dismissing Instabug
This block is executed on the UI thread. You can use it to attach logs and extra data to reports.
BugReporting.setOnDismissHandler(
function () {
console.log('SDK Dismissed');
},
function (error) {
console.log('Invoke dismiss handler could not be set ' + error);
}
);
Updated about 1 year 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 event handlers is also possible.