Android development and the Minifig Collector app

January 31st, 2011

About a year ago, I started taking a look at the Android OS as a platform for mobile application development.  I had recently purchased a Motorola Droid (on Verizon), and wanted to learn what it takes to develop an Android app.

My goal was to start out small, and learn the ins and outs of the platform.  I was also a bit rusty with Java, so I wanted to develop a small yet fun app.

Around the same time, LEGO came out with their Series 1 Collectible Minifigures (minifigs).  There are 18 minifigs to collect.  Inside each $3 bag sold is a single minifig, but the bags don’t say which minifig is inside.  You can feel around the contents of the bag and search for known shapes of their accessories, but that is tedious work and error prone.  Luckily someone noticed that each bag has two barcodes, and one of them is unique and consistent to each minifig.

So after a few weeks of coding, I released my first (free) app, called Minifig Collector on the Android marketplace:

It’s a pretty simple app, but it allows you to determine which minifig is in each bag by pointing your phone’s camera at the barcode, which is then scanned and decoded:

Once you’ve scanned the minifig, you can keep track of which ones you’ve found:

The app is pretty simple, but developing it gave me a good introduction to the platform and how the Android UI works.  I was able to utilize a free library called ZXing to handle the camera’s barcode scanning/decoding.

I’ve learned a lot about Android development along the way, and I am preparing a few follow-up posts about some of the things I’ve learned.  While the app is simple, I went a little overboard and explored unit testing, code style enforcement, continuous integration and debugging to see how it would work for future (paid) apps.  This lead to a bit of head-scratching about how to do various things, so I want to share my findings with others that are interested in Android development.

The app has about 5,000 downloads in the Android marketplace, and it looks like it’s helped a few people along the way.  Considering how much I’ve learned through its development, I’m pretty happy with my time investment in it.  I’m now working on a paid app.

Unfortunately, LEGO learned from community’s resourcefulness and removed the identifying barcodes in Series 3, though they left some identifying marks (‘bumpcodes’) on them so people can still (sometimes) determine which minifig is inside.  The phone’s camera can’t detect these codes, but the Minifig Collector been updated to show an image of the bumpcodes and still allows you to keep track of which Minifigs you have.

Share this:

Comments are closed.