Barcode Scanner application

Introduction

There are several barcode applications out for mobile devices. The usecase is more or less the same: “You are somewhere in a shop and want to buy some new thing. You are not sure if the price is hot, so you scan the barcode with your mobile device and do a price comparison.”

Android 2.2 is out, Flash Player 10.1 for Android is available and I wondered if I’m able to build such an application with my Adobe Flex / Java technology stack. To make it short: yes, I was able to build such an application with only some minor problems.

Everything needs a good name so you know immediately what the use is for the thing you are currently looking at. That was easy, my application is the Price-O-Mat!

The technology stack

I’m a Adobe Flex / Java developer, so I built the front-end using Adobe Flex, used GraniteDS for conversation between Flex and Java and I used Java to access the webservices which do the barcode to product description and the price comparison for me.
This is the rough architecture I used for the Price-O-Mat:

Minor Problems

One problem is it is not possible to access the webcam in Flash 10.1 for Android. I have absolutely no clue why Adobe did this, but with this limitation my webapplication doesn’t work on mobile phones – the barcode can’t be scanned.
But there is an solution: convert the webapplication to an Adobe Air application. Adobe Air for Android seems to support webcam access. By the way, my old mobile is designed to make calls, not to run any modern bling bling content….

Another problem seems to be with the EAN barcodes. It seems there is no complete worldwide central register. Amazon for example can only provide the EAN lookup for some country, i.e. for Germany and Japan. So I concentrated on Germany. Then I faced the problem Amazon has not the complete set of german EAN codes – I added another lookup source and now have a lookup chain mechanism which can be expanded if needed.

Well, the result is a webapplication which can be run in any webbrowser on any computer and maybe I’m going to create a Price-O-Mat Adobe Air application.

The working application

You can use the application with your computer. All you need is a webcam which can be focused on a near barcode and you need some german product with a EAN barcode on it.
Or you can watch the muted video.


As you see you just have to focus on the barcode and you get a list with price information. Of course the list is sortable. In the Price-O-Mat you have to do a double click on a list item and a page with the shop information is openend.
Just click the “scan again” button and you are ready to do the next price comparison.

Conclusion

The application works, I managed to handle the technology stack and one day I’ll have a mobile device which is able to run the application. This could be in near future because it is easy to make a Air application from the webapplication.
After that I could try to use the Air to iPhone/iPad converter to convert the Adobe Air application for Apples mobile devices. What an lookout!

Advertisements

2 thoughts on “Barcode Scanner application

    1. Hi Roy,

      this post is pretty old and as we all know the Flash Plugin for mobile devices is not able to access the camera. Therefore this application won’t work on any mobile device. The other problem is the code for looking up the prices is reversed engineered. So I don’t think it is a good idea to share the code.

      If you want to start a project using a barcode scanner in the fronend and access your own backend you can leave me a note and we can see if I can help you.

      Regards,
      Christoph

Leave a Reply

Fill in your details below or click an icon to log in:

WordPress.com Logo

You are commenting using your WordPress.com account. Log Out / Change )

Twitter picture

You are commenting using your Twitter account. Log Out / Change )

Facebook photo

You are commenting using your Facebook account. Log Out / Change )

Google+ photo

You are commenting using your Google+ account. Log Out / Change )

Connecting to %s