Initialize the SDK

Open your preferred development tool and add the following to your main class.


This two includes are everything you need.

protected void onCreate(Bundle savedInstanceState) {
BugBattle.initialise("apikey", BugBattleActivationMethod.SHAKE, getApplication());

Your API key can be found in the project settings within BugBattle. Possible values for the activation method are NONE, SHAKE, SCREENSHOT and THREE_FINGER_DOUBLE_TAB.

BugBattle.NONE: No automatic activation.

BugBattle.SHAKE: Activation on device shake.

BugBattle.THREE_FINGER_DOUBLE_TAB: Activation on double tapping with three fingers.

BugBattle.SCREENSHOT: Activation when user performs a screenshot trigger.

Manually initiate the bug reporting flow

Some situations require more control about the activation of the bug reporting flow. By calling the startBugReporting method, you can simply start the flow manually. In order to also prevent the shake gesture, just initialize the Bugbattle SDK with the activation method NONE.

The following method starts the flow, which is also invoked by the shake gesture. To start the flow use this method:


Customer email address

Sets the customer's email address.


Attach custom data

Sometimes you need to attach custom data to bug reports in order to solve them more quickly. Any simple dictionary can be attached.

try {
JSONObject jsonObject = new JSONObject();
jsonObject.put("key", "value");
} catch (JSONException e) {

Privacy policy

Enable privacy policy check

Enables the privacy policy check within the bug reporting flow. With this option set to true, users must accept the privacy policy in order to send a bug report.


Privacy policy url

Sets the privacy policy url. This is especially handy if you have any special requirements regarding the privacy policy. The default url is set to the Bugbattle privacy policy.



API url

Sets the API url to your internal Bugbattle server. Please make sure that the server is reachable within the network.