
Without getting into a major definition of what a QR code actually is, let me simply refer you to Wikipedia. These things are ultra-convenient, put them on a business card to contain all your contact information or direct someone to a URL. One can use any device with a QR scanner to read these codes.
While this isn't exactly everywhere here in the US _yet_ it has an amazing potential. What can we do as a developer then? Start using this everywhere and adding it to work.
Lets look then at how to build a super simple application to generate QR codes through the Google Charts API. Through an amazingly simple querystring builder one can generate these codes in any application. So...to start, lets build a QR generator with just a generic HTML form.
First off Google tells us we need to build a querystring as follows...
http://chart.apis.google.com/chart?cht=chart_type&chs=chartsize&chl=data_to_qrEncodeThrough a simple HTML form, using GET we can build this string on this in a few seconds.
<form method="get" action="http://chart.apis.google.com/chart">
<!-- note value as QR -->
<input type="hidden" name="cht" value="qr" />
<!-- create a 230 x 230 image -->
<input type="hidden" name="chs" value="230x230" />
Text to Encode: <input type="text" name="chl" / >
<input type="submit" />
</form>Quick and simple right? We'll build on this further in the coming days and look at ways of integrating this into a C++ application, Java and possibly Objective-C. In the mean time, here's a usable demo of the above form.
0 comments:
Post a Comment