By default, Instabug is shown when the device is shaken. This can be customized to several other modes that show 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 screenshot
- Tap on a floating button shown above your app's UI
- Two-finger swipe from right to left
- None (manual showing)
You have the option to set one or multiple invocation events. To customize the invocation event, pass one of the values of the
InvocationEvent enum when starting the SDK.
Instabug.start('APP_TOKEN', [InvocationEvent.shake]); //Second argument takes an array of invocation events
ArrayList<String> invocationEvents = new ArrayList<>(); invocationEvents.add(InstabugFlutterPlugin.INVOCATION_EVENT_SHAKE); new InstabugFlutterPlugin().start(CustomFlutterApplication.this, "APP_TOKEN", invocationEvents);
You can find the possible invocation events below.
InvocationEvent.none InvocationEvent.shake InvocationEvent.screenshot InvocationEvent.twoFingersSwipe InvocationEvent.floatingButton
InstabugFlutterPlugin.INVOCATION_EVENT_NONE InstabugFlutterPlugin.INVOCATION_EVENT_SHAKE InstabugFlutterPlugin.INVOCATION_EVENT_SCREENSHOT InstabugFlutterPlugin.INVOCATION_EVENT_SWIPE InstabugFlutterPlugin.INVOCATION_EVENT_BUTTON
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 shown through the other events.
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 shown, a popup appears to your app users with options for them to report a bug ("Report a bug"), share feedback ("Suggest an improvement"), or ask you a question ("Ask a question").
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, feedback, or question reporting flow.
For bug, feedback, and questions, you can also specify invocation options as described here.
// Compose a new bug report // Compose new feedback // Compose a new question // Show the previous chats list
This API will show users a form they can use to submit new feedback and suggestions.
This API will show users a page where they can see all their ongoing chats. If the user has no ongoing chats, this API won't have an effect.
Updated 3 months ago