Buglife Android

Awesome mobile bug reporting!

Documentation Twitter

Buglife is an awesome bug reporting SDK & web platform for Android apps. Here's how it works:

  1. User takes a screenshot, or stops screen recording
  2. User annotates their screenshot & writes feedback
  3. Bug reports are pushed to your team's email/Jira/Slack/Asana/wherever you track bugs.

You can also find Buglife for iOS here.

Main Features
Free + no account required
Open source
Fast & lightweight
Automatic caching & retry
Screen recording
Custom form fields, with pickers & multiline text fields
Advanced logging, with debug / info / warning levels
Custom attachments, including JSON & SQLite support


If you use targetSdkVersion version 29 or higher, you should add android:requestLegacyExternalStorage="true" into your AndroidManifest.xml.

<manifest ... >
  <!-- This attribute is "false" by default on apps targeting
       Android 10 or higher. -->
  <application android:requestLegacyExternalStorage="true" ... >
  1. Add buglife-android as a dependency to your app's build.gradle.

    dependencies {
    	implementation 'com.buglife.sdk:buglife-android:1.5.2'
  2. Create an Application subclass in your project if you don't already have one. (And don't forget to add it to your app's AndroidManifest.xml.)

  3. Add the following lines to the end of the onCreate() method in your app's Application subclass:

    Buglife.initWithEmail(this, "[email protected]");

    Be sure to replace [email protected] with your own email address; this is where bug reports will be sent to.

    Got an account?

    If you have a Buglife account already, you should initialize Buglife with your team's API key instead of your email:

    Buglife.initWithApiKey(this, "YOUR_API_KEY");
  4. Build & run on a device; take a screenshot to report a bug!

  5. Submit a bug report from your device, then check your email for a link to the Buglife web dashboard!



There are 2 different ways to invoke the bug reporter, enumerated by Buglife.InvocationMethod:

  1. SHAKE: Invokes when the user shakes their device.

  2. SCREENSHOT: Invokes when the user manually takes a screenshot with their device.

  3. NONE: Disables all except manual invocations.


    This may be preferable for production builds. In this case, we recommend embedding a hidden button somewhere in your app which manually presents the bug reporter, so that you can still collect logs & other information.

For both automatic invocations (SHAKE and SCREENSHOT), a screenshot of the current activity is captured & attached to the bug report draft.

We recommend using the screenshot invocation for most apps. Taking screenshots to report feedback comes naturally to most users, and screenshots are still saved to the user's device as expected.

Manual & Custom Invocations

You can manually present the bug reporter activity using:


Unlike the SHAKE & SCREENSHOT invocations, manually presenting the bug reporter activity does not automatically capture & attach a screenshot to the bug report draft.

This is useful for situations where attaching a screenshot of the immediate application state doesn't make sense (for example, if you have a "Report Bug" option in your app's settings screen).

Manually capture & attach screenshots

You can capture a screenshot of your app at any moment using Buglife.getScreenshotBitmap(). You can then create an Attachment object from the generated bitmap, and add this to your bug report draft using the Buglife.addAttachment() method. For example:

// Capture a screenshot of the current activity
Bitmap screenshot = Buglife.getScreenshotBitmap();
// Create an Attachment object with the generated screenshot
Attachment attachment = new Attachment
		.Builder("Screenshot.png", Attachment.TYPE_PNG)
// Queue the Attachment for the next bug report draft
// Show the bug reporter activity. This will include the queued attachment

User Identification

If your application stores a users email address, then typically you should simply set the users email address shortly after initializing Buglife:

String email = /** Current user's email */

Alternatively, you may set a string representing the users name, database ID or other identifier:

String username = /** Current username */

User Location

By default, if your app is granted location permissions, Buglife will include that location in the report. This is useful for tracking down location-relevant bugs, such as services that are erroneously offered or not offered based on location.

You can change this behavior with the following:


If the app does not request a location permission or the user denies the request, Buglife will not collect or include location data.

Custom Attributes

Adding custom attributes

You can include custom attributes (i.e. key-value pairs) to your bug reports, as such:

Buglife.putAttribute("Artist", "2Pac");
Buglife.putAttribute("Song", "California Love");

Removing attributes

To clear an attribute, set its value to null.

Buglife.putAttribute("Artist", null);

Screen Recording

Buglife can be used to record a user's screen, and attach the recording to a bug report. Screen recording is initiated programmatically, like such:

Here's how the complete screen recording flow works:
  1. The screen recording flow is initiated using Buglife.startScreenRecording();
  2. The user is shown an OS-level prompt requesting permission to record the screen.
  3. Once granted, Buglife immediately begins recording the screen.
  4. Screen recording will progress for up to 30 seconds. If the user wishes to stop screen recording earlier, they may do so by tapping the floating Record button.
  5. The Buglife reporter UI is automatically shown with the recording attached.

Learn more

Check out the Buglife Android guide for configuration & customization options.


Copyright (C) 2017-2019 Buglife, Inc.

Licensed under the Apache License, Version 2.0 (the "License");
you may not use this file except in compliance with the License.
You may obtain a copy of the License at

Unless required by applicable law or agreed to in writing, software
distributed under the License is distributed on an "AS IS" BASIS,
See the License for the specific language governing permissions and
limitations under the License.