Invocation

This page covers the different ways you can invoke Instabug's SDK.

By default, Instabug is invoked when the device is shaken. This can be customized to several other out-of-the-box modes to show the SDK. You can also show the SDK manually from a custom gesture or a button you add to your app.

Invocation Events

You can set the SDK to be shown using one of the following modes:

  • Shake device
  • Take a screenshot
  • Tap on a floating button shown above your app's UI
  • Do a 2-finger swipe from right to left

To customize the invocation event, pass one of the values of the InvocationEvent enum from the Inspector pane for iOS, and from the application class for Android.

None
Shake
Screenshot
TwoFingerSwipeLeft
RightEdgePan
FloatingButton
// You can change the invocation event to NONE, FLOATING_BUTTON,
// SCREENSHOT_GESTURE, or TWO_FINGER_SWIPE_LEFT.
...
  new Instabug.Builder(this, "YOUR_APP_TOKEN")
                .setInvocationEvent(InstabugInvocationEvent.SHAKE)
                .build();
...

Manual Invocation

You can also invoke the event manually as follows.

Instabug.Invoke();

Normally when the SDK is invoked the users are shown a window from which they can select what exactly they want to do.

Alternatively, you could show the SDK with a specific feature.

Instabug.InvokeWithInvocationMode("newBug");

Here are the possible modes.

none
newBug
newFeedback
newChat
chatsList