0

Bugsense: Must Have Tool For Android Developers

This image has no alt text

One of the major challenges as a developer on the Android platform is supporting a large variety of devices running different versions of the Android OS.  Add factors into the mix such as app version, network or WiFi connections, screen dimensions, location and so forth, and as you can imagine it quickly becomes a major task to keep up with what bugs are effecting what devices and on what configurations.

Wouldn’t it be nice to have a tool that collects and analyzes all these different bugs and crash reports?  A tool I personally use and recommend does exactly that and it’s called Bugsense.

 

If you are in need of a tool that can help manage your crash reports I highly encourage you to check out BugSense.  You can sign-up for a free account to see how beautiful errors can be. Okay, not the errors themselves, but the reporting of the errors. I admit, I am a sucker for eye-candy in web apps but BugSense is not just eye candy.  The reports show critical information regarding your bugs and their adverse effects in a clean and organized package… and did I mention in real time?

Find bugs fast by using their grouping, tags and OS filtering.  Grouping is one my favorite features which provides total occurrences which ultimately allows you to visualize what bugs need immediate attention.

 

 

When you resolve your bug you can record what version you issued a fix.  This is great so you can easily tell if you get old bugs that no longer need attention.  BugSense also provides a very unique feature which can send a notification to a user if they experienced a bug that you have already fixed.  I have not yet set this up for apps I’ve worked on personally, but it does seem tempting and could prevent unnecessary support emails (not to mention bad ratings and uninstalls).

Depending on your Bugsense purchase plan you can look back through up to 90 days of data (the free version offers 7-days of data retention).  Seven days is a nice trial but may be impractical for your needs: an affordable $19/month “Indie plan” offers a sizeable 30 day window to see bugs.  Developers of larger apps/games or full scale businesses may want to consider the Plus ($99/month) or Premium ($299/month) accounts which admittedly cost a bit, but if it saves you time and time is money? It’s a drop in the bucket. Not to mention, better bug reporting can help you build a better product, and that’s the pinnacle of importance.

If you have an opensource application you will be glad to learn that BugSense will now offer you a Premium account for FREE!  That’s right – read their official announcement on the topic – that’s what I call a team player!

Getting Started with Bugsense

Now let’s dive into some quick discussion about how to get started. The best attribute about this tool is that it literally takes only a few minutes to setup an account, and get working in your application.

Setup and Install

Step 1)
Go to http://bugsense.com and create an account.  Easy peasy: you can even use your Google account to sign-in.  Once logged in you will need to create a new project so you can get an API Key, which will be use later in Step 4.

Step 2)
Make sure your application has permission to access the Internet by adding one line of code to your manifest:

<uses-permission android:name=”android.permission.INTERNET” />

Step 3)
Download the BugSense Library for Android here and then place the lib file in your project structure

Step 4)
Add a few minimal lines of code to your app as such:

Import the main file:

Add one line to your onCreate: (using the API Key from Step 1)
Already using ACRA?

No problem here if you are using ACRA 4.x (which most should be), BugSense has built in support for this as well!  It just takes one extra line of code as well as the extra variables you would like to pass… BugSense alone does an excellent job in capturing all of the important variables you as a developer should need.  

ProGuard Support?

If you have important proprietary code you most likely use (or should use) which is a free Java class file shrinker, optimizer, obfuscator, and preverifier.  What is that?  In layman’s terms it makes it harder for your application to be decompiled.  It also makes it harder to troubleshoot since you would manually have to re-trace your file to figure out what a reported bug actually is.

If you have a large user base you may want to check out BugSense’s solution which is a Plus and above feature called "Symbolication on the fly".  It’s as simple as uploading your pro-guard mapping file and then letting BugSense do its magic.  From personal use of this feature I can’t even begin to explain the amount of time it saves… not to mention the HUGE convenience.  

Detailed Docs

Keep in mind that BugSense handles all unhandled exceptions automatically but there are times when you need to handle the exception yourself.  To view all of these snippets along with some other more complex examples, please visit their detailed docs section located here.  

Summary

With BugSenese offering a free trial plan it’s an absolute no brainer to give it a try.  If you find it doesn’t help you out, no loss, but in most cases I feel developers will benefit from this kind of tool.  You can manage multiple applications from one account and even setup access for multiple users so if you have a dev team, you can all play nice together.  If you support multiple mobile platforms you will be pleased to hear that they also support iOS, WP7, Google AppEngine, HTML5 and soon even Blackberry.

How many of you developers use Bugsense? Not a developer but still enjoyed the article?… Let us know in the comments below :)