Use this handler to run any code prior to Instabug being invoked.
This block is executed on the UI thread and could be used for performing any UI changes before the SDK's UI is shown.
BugReporting.willInvokeHandler = {
someObject.setSomeState()
}
IBGBugReporting.willInvokeHandler = ^{
[someObject setSomeState];
};
BugReporting.setOnInvokeCallback(new OnInvokeCallback() {
@Override
public void onInvoke() {
//do something
}
});
BugReporting.setOnInvokeCallback {
//do something
}
BugReporting.onInvokeHandler(function () {
// Perform any UI changes before the SDK's UI is shown.
});
BugReporting.setOnInvokeCallback(Function function);
BugReporting.setOnInvokeHandler(
function () {
console.log('SDK Invoked');
},
function (error) {
console.log('On Invoke handler could not be set ' + error);
}
);
//iOS
IBGBugReporting.WillInvokeHandler = () =>
{
Console.WriteLine("SDK will be invoked!");
};
//Android
Instabug.SetOnSdkInvokedCallback(new IOnSdkInvokedCallbackClass());
private class IOnSdkInvokedCallbackClass : Java.Lang.Object, IOnSdkInvokedCallback
{
public void OnSdkInvoked()
{
Android.Util.Log.Warn("OnSdkInvoked", "Instabug SDK invoked");
}
}