Entries:
Comments:
Posts:

Loading User Information from Channel 9

Something went wrong getting user information from Channel 9

Latest Achievement:

Loading User Information from MSDN

Something went wrong getting user information from MSDN

Visual Studio Achievements

Latest Achievement:

Loading Visual Studio Achievements

Something went wrong getting the Visual Studio Achievements

Window Phone 7.5, ZXing and QR codes

QR codes appear to be appearing everywhere. From outside our favorite restaurants, to magazines, TV shows to even using them to communicate between Windows Phone 7 devices and the XBox and Kinect (see story)!

So how do we get this kind of magic into our apps? Jonas Follesø has got our back and shows us just that...

QR code scanning on Windows Phone 7.5 using ZXlib

One of the big new features of Windows Phone 7.5 (code named Mango) is direct camera access. Having access to the camera stream enables several new scenarios, such as in-app QR and barcode scanning, augmented reality applications or custom looking photo camera UI. There are some good resources on how to use the new APIs to access the camera in Mango, but I haven’t found any complete examples of how to implement a QR code scanner, which is what I am going to do in this blog post.

...

When starting on the task of building a QR scanner one of the first things I did was to research different open source libraries to do the image recognition. Thankfully there are multiple libraries available, but the ZXing library from Google seems to be one of the most popular. The ZXing library is ported to multiple programming libraries, and supports a wide variety of 1D/2D codes (QR, Code128, Code39, EAN and many more). There is a C# port of the library, which has later been ported to Silverlight and Windows Phone 7. So the actual task of writing the QR scanner is to integrate the ZXing library with the Mango camera API.

The XAML code for the scanner consists of 4 main components. ...

The post continues on showing us a number of ins and outs in using ZXing and the WP7.5 camera API's.

SNAGHTML1a16e92

Here's a snap of the Solution;

SNAGHTML1b08148

Note: That while the app runs in the emulator, it's pretty pointless since the emulator doesn't hook into any cams you might have... 

Now that Jonas has shown us how, the rest is all downhill from here...  (Actually now's the hard part, coming up with our own unique means of adding this magic to our app's... but you get the idea.)

Here’s a few more links you might find interesting:

Follow the Discussion

  • Jonas FollesoJonas Folleso

    Awesome! Thanks for sharing my post on Coding4Fun blog :)

  • dotNetFollowerdotNet​Follower

    Hello!
    <a href="http://dotnetfollower.com/wordpress/2011/11/silverlight-for-windows-phone-7-how-to-use-zxing-7-1-in-silverlight-2/">Here</a> is the port of ZXing 7.1 to Silverlight. Probably, it will be useful for somebody.

Remove this comment

Remove this thread

close

Comments Closed

Comments have been closed since this content was published more than 30 days ago, but if you'd like to continue the conversation, please create a new thread in our Forums,
or Contact Us and let us know.