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.

Interesting. Have you thought about the fact that if there's absolutely no alpha-numeric info on the card then they won't be able to tell that the card is yours? I don't know about you, but I have a small collection of cards in my wallet and a friend has an enormous stack on his desk - if they were all qrcodes then I'd have no idea who's was who's without scanning them all (imagine I'm without my mobile or it's flat or died and so I no longer have them all in my address book). If I were to go down the qrcodes path (and I think I might) then I'd definitely have it as a standard business card with the qrcode to the side or on the back or something - if only to ease migration.

@Graham I don't know about you, but when I get a business card, I put the contact information in my mobile or in Google contacts, then I toss the card. I don't have stacks of business cards. In fact, I don't think I could fine one that isn't mine if I tried. Further, I doubt the one who receives my business card will likely forget me or who I am. Your point is taken though. Although, I don't understand why you would have a stack of QR code business cards, if you've likely already scanned them anyway.

and scan the resulting QR code, Barcode Scanner on the Droid shows the URL and it's a link I can actually click on. But I thought that URL would be included as the Gmail Contact "website" field and it isn't.

I am totally with you on making this automatic. The hcard (as far as I can tell) doesn't populate a card or even give you the option to add a new contact. The MECARD seems the way to go, but some many issues.

1) Name field (N) populated only the first name on andriod (user intervention
2) MECARD doesn't appear to allow for phone types (mobile, home, work, fax)
3) The address all populates the address field and not the city, state and zip.
4) URL doesn't seem to be recognized.

1) The name field is limited only to what you provide it with. If you scan my card (with a barcode reader that has full MECARD support), the full name, separated by the last and first even, is available.
2) Yes. This is a limitation. However, it does support multiple TEL numbers.
3) The address can be parsed by address field, city, state, zip, etc. The fields divided by commas (,) denote PO box, room number, house number, city, prefecture, zip code and country, in order.
4) I don't know what your problem is with the URL, but it scans fine here, and clicking the link pulls up the page.

{ 1 } Trackback

[...] anyone can generate and use QR codes without fear of royalty payments, licensing restrictions, etc. I even made my own business cards out of QR Codes. Anyway, today I saw the Three Laws of Robotics in QR codes on the door frame of my physics [...]

Post a Comment

Your email is never published nor shared.

Name

Email

Website

Comment

Wordpress Hashcash needs javascript to work, but your browser has javascript disabled. Your comment will be queued in Akismet!