Installation
Gradle Installation
Add the following dependency to your app module's build.gradle file
dependencies {
implementation 'com.bugsee:bugsee-android:+'
}
The statement above will fetch the latest available version. If instead you want to stick to some particular version, replace the plus symbol (+) with desired value. You can find all the released versions in our release notes.
This is the recommended way to install Bugsee.
If you use Maven (for example, Android Maven Plugin) to build your project, follow the Maven Installation instructions.
If you're getting an "attribute android:foregroundServiceType not found" error, you should set compileSdkVersion in your build.gradle file to 29. Make sure you have that Android SDK installed on your system.
Initialization
If you have no android.app.Application subclass, it is necessary to create it and to specify its name as the "android:name" attribute in your <application> tag in AndroidManifest.xml.
<application
android:name="com.example.MyApplication">
<!--...-->
</application>
Launch Bugsee from onCreate() method of your Application subclass.
- Java
- Kotlin
import com.bugsee.library.Bugsee;
public class MyApplication extends Application {
@Override
public void onCreate() {
super.onCreate();
Bugsee.launch(this, "<your_app_token>");
}
}
import com.bugsee.library.Bugsee
class MyApplication : Application() {
override fun onCreate() {
super.onCreate()
Bugsee.launch(this, "<your_app_token>")
}
}
If you want to launch Bugsee from some other place (e.g., after a particular user action), you must use another variant of Bugsee.launch() which accepts Activity as the first argument. You must pass the current top activity into it.
- Java
- Kotlin
import com.bugsee.library.Bugsee;
public class MyCustomActivity extends Activity {
public void onUserClick() {
Bugsee.launch(this, "<your_app_token>");
}
}
import com.bugsee.library.Bugsee
class MyCustomActivity : Activity() {
override fun onUserClick() {
Bugsee.launch(this, "<your_app_token>")
}
}