Tip of the Day: QR codes for the Android Market

Post date: 11-Dec-2009 11:44:52

UPDATE: Google has deprecated the QR code part of the charts API - but they say it will work until 2015.

There's instructions for generating QR codes; there's online generators and even the Google Charts API will render them. And although it took a while to find them, there's also instructions on how to link to apps (technically app searches) in a way that an Android device will launch the Market app.

But despite QR codes being a handy and popular way to collect and install Android apps, it took me hours to find this article tying the two together, and it's not exactly thorough. So to spread the knowledge a little wider, here's how I generate the QR code I use on the SofaStream page:

The link

As described over here, the Market app registers to manage any 'market://' URLs that turn up. So the URL we'll be using is:

market://search?q=sofastream

It's also possible to use filters like 'pname:' in front of the search value - this limits the search to application package names. In this case we'd use pname:com.twilight.sofastream (the package name for SofaStream.)

The codeGoogle's Charts API is the easiest way to create the image we need - here's the resulting URL:

http://chart.apis.google.com/chart?cht=qr&chs=230x230&chl=market://search?q=sofastream

'cht=qr' sets the chart type, 'chs' sets the chart size, and 'ch1' is the search string listed above.

And the result is show on the right...

Bonus tip: this article has some really useful information on creating and decoding QR codes on Android devices.