Getting started

Android SDK
BugBattle Android SDK

​​​​

With BugBattle we’ve put the lame task of bug fixing upside down and turned it into a gaming experience for you and the whole development team. As if by magic the quality of your apps and websites improves – and your customers will be delighted.

πŸ”§ Getting started

The easiest way to integrate BugBattle into your apps is by using the BugBattle Android SDK! This article explains the basic steps to integrate this library to your personal project. πŸ˜ƒ

πŸ’ͺ Add BugBattle

Open your app in your preferred development tool, for e.g. Android Studio.

Add the dependency

In the same file ( build.gradle ) add the dependency to include the library.

dependencies {
...
implementation 'io.bugbattle:Bugbattle-Android-SDK:3.1.5'
}a

( don't forget to synchronise your includes πŸ˜„)

By adding this, you are ready to use the library in your app. Let's carry on with the initialisation πŸŽ‰

Initialise the SDK

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

import bugbattle.io.bugbattle.BugBattle;
import bugbattle.io.bugbattle.BugBattleActivationMethod;

This two includes are everything you need.

@Override
protected void onCreate(Bundle savedInstanceState) {
....
BugBattle.initialise("apikey", BugBattleActivationMethod.SHAKE, this);
}

Add the initialise method to your main activity . Your API key can be found in the project settings within BugBattle. The second parameter is, how the bug report flow is started. There are multiple ways to activate the flow.

BugBattleActivationMethod.NONE: No automatic activation.

BugBattleActivationMethod.SHAKE: Activation on device shake.

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

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

BugBattle.startBugReporting()

Now you are ready to go πŸ˜„

🀝 Need help?

We are here to help! [email protected]​