Image of the glider from the Game of Life by John Conway
Skip to content

QR Code with MECARD and hCard

It's the digital age. Computers are getting cheaper and stronger. Mobile smart phones are becoming a household fixture. Networking is more readily available than ever before and increasing its speed. Yet, many of our daily products remain locked in the past, not taking advantage of what technology has to offer. So, personally, I decided to change the way I at least interact with the digital world, and hopefully, can cause some ripples in the process.

First, I wanted to change my personal "business" card (referred to as a "personal card" from here on out). My initial personal card was an Ubuntu one I had printed after becoming an Ubuntu Member. I ordered 2,500 of them a couple years ago, and I've handed just about every one of them out. Rather than reorder a new batch, I wanted something more generic than just targeting Ubuntu. Further, I wanted to take advantage of technology.

When Google changed their front page logo to a bar code on October 7, 2009 to celebrate the approval of the bar code patent, I spent a great deal of time on Wikipedia learning about bar codes. I knew there was a quite a few out there, but I wasn't aware of all the types, how the encoding was handled, and so forth. In the process, I discovered QR Code.

QR Code appealed to me for a few reasons. First, although a patented technology, it's royalty-free and the patent owner has promised to not exert patent rights on it. This is the same case as with Ogg Vorbis. So, although not truly an "open format" in the pure sense of the word, good enough for me. Further, there is a an application called "qrencode" that is Free Software and available an most GNU/Linux operating systems. So, this makes it easy to create your own QR codes. Second, the technology behind the QR code is rather slick. It contains error correction, should up to 30% of the code be damaged or unreadable. It can be scanned any direction in 360 degrees for bar code scanners. The density is high enough to store up to 7,000 characters. More features can be found on the owner's page.

Immediately, I saw this as an opportunity to encode my contact information. This would be a great way to put your name, web site, email, address, telephone number, and other useful information in a compact space. I could see putting this up on web sites to avoid email harvesters (although it's only a matter of time before they are smart enough to decode QR codes). Then I thought, why not put it on my personal card? The only thing that was preventing me from doing so was an efficient way for a contact who receives my card to get the data out of it.

At the time, the only decoder I was aware of was the ZXING site. You gave it a URL path to a QR code image, or uploaded your own, and it would decode the information. I didn't want people scanning my personal card to an image, then uploading that image to the site. There has to be a better way. So, I started browsing the ZXING site a bit, and I learned that it's an Open Source project for creating a bar code reader. The project is hosted on Google Code, and I found that there is a Blackberry, iPhone and Android app. SWEET!

So, now people can install the free app on their phone, scan the image, and parse out the contact information. The only problem that I saw at the time, is even though they can scan the QR code, and decode the data, the app just presents the user with the raw data, with no ability to add that information to their address book. So, my quest continued. Surely, there must be a way to get the contact information out of the QR code, and into an address book. So, back to web to found out how.

Needless to say, it didn't take long at all before I learned about MECARD. You can think of MECARD as a light version of vCard. Essentially, a single line of text contains all the meta data and appropriate information for populating an address book. Info such as name, address, telephone, email, URL and more. Further, the ZXING app supports parsing MECARD data, and adding that data to your address book!

At this point, I was satisfied. I'm ready to build my own QR code, and put it on my personal card. Well, almost ready. I wanted one extra step before I was ready to commit my personal card to the printer. For the URL in my MECARD, I wanted it to point to additional contact information that could also be parsed using computing for adding to an address book, whether it be on a mobile phone or an email address book, such as in Mozilla Thunderbird or Outlook, or even online, like with Google Contacts. So, I spent more time searching the web, finding a way to get all this integrated.

It wasn't long before I found hCard. hCard is an HTML version of vCard. It's a microformat for embedding HTML into a web site, so applications, just as JavaScript or Firefox extension, can parse the data, and populate an address book with the appropriate entries. The whole point is to keep the contact from entering in the contact information by hand. Otherwise, I just would have printed the raw ASCII on the personal card. No, I want to fully automate my contact information from head to toe taking advantage of mobile phones and other technology. So, hCard fit the bill.

I began populating my own hCard to put on my main site, then the URL in my MECARD would point the user that direction. However, I found that my Google Profile already supports hCard, FOAF, XFN and other standards. So, for me, it made sense to point people that direction rather than build my own. However, after having my QR Code created with everything I wanted, and pointing them to the right URL, and getting the cards printed, I found that Google isn't exporting email address, URL, telephone, or other information that hCard supports in the HTML. I'm a bit disappointed by this, and I wish I would have paid closer attention, but I guess it will have to work for the time being. I'm hoping that Google adds this data to the hCard export, so I don't have to change my personal cards in the near future. 🙂

Now, the personal cards themselves. I wanted to go hard core, relying 100% on technology to parse the data rather than a human. So, I put just the QR Code on the "front" of the card, with no alphanumeric data anywhere to be found. On the back of the card, I put the glider image, a fanboy icon for the hacker culture and ethic. That's it. An image on one side and an image on the other. The personal card itself has no rotation and should you have a smart phone with a bar code reader, it should be trivial for you to get out the contact information, and populate your address book.

This is a trial run. I don't know what will happen or what will come about as I start handing out this card to people. Time will tell. It should be interesting though, and I'm sure it will be quite the conversation starter. Here's to risks.

{ 13 } Comments