By default, Instabug is invoked when the device is shaken. This can be customized to several other modes that invoke the SDK. You can also invoke the SDK manually from a custom gesture or a button you add to your app.
You can set the SDK to be invoked when your users do one or more of the following actions:
- Shake device
- Take a normal screenshot
- Tap on a floating button shown above your app's UI
- Do a two-finger swipe from right to left
- None (manual invocation)
How to show Instabug
You have the option to set one or multiple invocation events. To customize the invocation event, pass one of the values of the
InstabugInvocationEvent enum when starting the SDK.
new Instabug.Builder(this, "APP_TOKEN") .setInvocationEvents(InstabugInvocationEvent.SHAKE, InstabugInvocationEvent.SCREENSHOT) .build();
You can find the possible invocation events below.
NONE SHAKE FLOATING_BUTTON SCREENSHOT_GESTURE TWO_FINGER_SWIPE_LEFT
If you are using the floating button, you can set its default position as explained here.
Use the "none" event if you want to invoke the SDK manually in order to prevent the SDK from being invoked through the other events.
If you are using the shaking gesture as your invocation event, you can set how sensitive the device should be to the shaking. The default value is 350. The higher the value, the less sensitive the device will be to shaking.
If you want to change the invocation event to any of the other supported events, you can do so at runtime as shown below.
By default, when the Instabug SDK is invoked, a popup appears to your app users that asks "How can we help you?" with options for them to report a bug ("Report a problem"), share feedback ("Suggest an improvement"), or send you a message ("Talk to us") if In-App Chat is supported in your plan.
The Prompt Options menu appears when Instabug is invoked in your app.
Instead of showing this Prompt Options menu that lets your users choose what they want to do, you can skip this step and take users directly to the bug or feedback reporting flow or chat pages.
For bug and feedback reporting, you can also specify invocation options as described here.
BugReporting.invoke(InvocationMode,InvocationOption) // You can also specify invocation options EMAIL_FIELD_HIDDEN EMAIL_FIELD_OPTIONAL COMMENT_FIELD_REQUIRED DISABLE_POST_SENDING_DIALOG
Here are the possible invocation modes.
PROMPT_OPTION NEW_BUG NEW_FEEDBACK NEW_CHAT CHATS_LIST