Android Tip: Remote stack traces

On the whole, the response I’ve gotten to OneBusAway for Android has been overwhelmingly positive, and I’m highly grateful for all the emails and comments of praise I’ve received in the months since it was released under its previous name, SeattleBusBot.

Unfortunately, you can’t please everyone all the time. It’s a given that no matter how much testing you do, when you release your app “into the wild” there are bound to be unexpected problems. With Android development specifically, it’s nearly impossible for a part-time developer to do adequate testing on all the different versions and devices available. So there will be some set of users on whose devices your app just doesn’t work or force closes inexplicably. What is the way you find out about this? In general, it’s when those upset users rate your app “1 star” on the Market. Not very helpful, and it generally leaves you wondering where this crash might occur.

That’s when you turn to Android Remote Stacktrace by Nullwire. It’s so useful it’s a wonder why it isn’t a default feature of the Market. The idea is simple: catch any uncaught exceptions, write the stacktrace to a file, and then post that (and a few other useful bits of information) to a server. The provided JAR file is simple to integrate into your source, and you can either use their default server trace.nullwire.com or a sample PHP script. Or you can be like me and write your own Django app. Either way, you can now get those pesky crashes wherever they may occur.

This is now enabled in the most recent release OneBusAway for Android, v1.2.1. When I get bored I’ll probably add email and feed support to the Django app, plus some other management goodies. And hopefully I’ll get a chance to fix some of the bugs that people have been seeing, and see more people change those 1 star reviews to 5 stars.

About

I like wearing different hats. Follow me on Twitter. Connect with me on Google+