VCards and QRCodes

For my employer we have developed the QRCode on our business cards. This QRCode contains a link to a website where the VCard of the employee can be downloaded. A VCard is a standard http://en.wikipedia.org/wiki/VCard for electronic Business Cards.

WP_20130417_001

The idea of the QRCode was to download the VCard of the employee and so add the data to your address book. The VCard could also be added to the QRCode, but then the QRCode changes with a function change or mobile number change. To us this looked not quite handy. That is why we choose to make the VCard available on a website.

For the creation of the QRCode we used the standard ZXING barcode library (http://code.google.com/p/zxing/downloads/list). But Prodware is a Microsoft oriented company, so we needed a C# variant of this lib. No problem there is a Nuget package (https://nuget.org/packages/ZXing).

To create the code you need this code snippet.

image

By the way this library can also be used as QRCode/Barcode scanner in your WP8 or Windows 8 app. I have done that twice now, but more about that later.

The VCard standard is handy, but there is a problem. Internet browsers handle the different on the different devices. On a normal Windows 8/Windows 7 computer the VCard can be downloaded without trouble and the data can be added to the address book of Windows or Outlook. Also on a Windows Phone 7.x. But Windows Phone 8, Android and iPhone don’t, there is no default application connected to the extension etc.

To solve this, the VCard should be mailed. So we are changing the website so the VCard can be mailed. But of course we want it dependent of the device.

Mobile:

wp_ss_20130417_0004 wp_ss_20130417_0001

Desktop:

wp_ss_20130417_0002 wp_ss_20130417_0003

With C# and MVC 4 it is simple. MVC 4 is already handling mobile browser much better. In the view you have to add this code.

image

image

Problem solved. Now we need to deploy it to our on-premise servers. The test environment runs on Windows Azure 😉

Leave a Reply