Windows Mobile Bar Code Manager and API

While I was checking out of the grocery store tonight, I realized I had left my "preferred savings" card in my car's glove compartment as usual. Naturally, my train of thought derailed into Windows Mobile development and how I could make my life easier. The answer was simple: why can't I save all my bar codes into a program and have the cashier scan the image from my cell phone? It would save wallet space and be really cool to boot!

After a quick investigation into how bar codes work, I began coding. The end result is the following:

barcode barcodeedit

Above, I have two of my grocery cards entered into my Bar Code manager. In the editor screen, one can enter a bar code number and view it in real time.

The API (BarCode.dll) is simple:

  1. Create a BarCodeSerializer object.
  2. Set the DisplayNumber property to your bar code number you want to process.
  3. Use the IsValid property verify it is a valid 12 digit bar code.
  4. Use the MakeValid property to make a valid 12 digit bar code from an 11 digit number. Some cards only show 11 of the 12 digits. The 12th is used as a "check" digit.
  5. Use the CreateBitmap method to create a bitmap of approximately the desired dimensions.

In a possible future release, I might extend the bar code manager to take a picture with a high resolution camera and import a bar code number. That would be an interesting computer vision problem!

Download the Bar Code Manager and API here.

17 comments:

Peter said...

Hey, I realy like your idea, as I've experienced that same "problem" too.
Any plans to expand the app to include EAN type bar codes? That would certainly be welcome for your european visitors!
some info:
http://en.wikipedia.org/wiki/EAN_code
grtz.

Proto732 said...

Not a programmer here, but a user since CE 1.0.

Your barcode app is a great idea!! I actually tried a "work around" for this problem a month or so ago by scanning my various cards to JPG's and putting them on my BJ2 and TILT.

At the time thought my scans just weren't clear enough, but after installing and using your app I am beginning to wonder if store scanners can't read off an LCD screen.

Did you run into any issues in real world use?

The bar codes I entered into your app look identical in bar configuration (not scale though) but will not register on a grocery store style flatbed barcode scanner.

any thoughts?

Koush said...

Scanning the image may not be as accurate as having the device actually generate it.

The PDA screen is somewhat reflective, so no, grocery scanners don't always play nice with it. You sort have to sort of tilt the device away from the scanner to get it to work.

daniel said...

If you are interessted I have code 39 reader - that works at least on Tytn's with the camera

Jay said...

Hey man - just wanted to let you know your program is a life saver. I just had my truck broken into last night and several gift certificates were stolen. I had just installed your program yesterday and backed up the gift cert #s. I was able to transfer the value of all of the gift cards thanks to your program. Fortuitous timing :) thanks!

Anonymous said...

Great proggie.
Imagine the power of this and coupons! Even now coupons are used by pros to buy things they dont need to bank money so they get the stuff they do want for free.
Problem has always been...organizing coupons to know what to buy/when to use coupons for items youve bought and to have them available when at checkout.
Imagine...scan item / database searched and appropriate coupon datamined...
Your thoughts?
Managing coupons in an indexing fashion, then using mobile phone code scanning and database mining in order to use coupons asap...awesome!

Kim G said...

I DESPERATELY want this for my phone!!!

I have cupcake though, any chance of this getting turned into an APK file?

Please oh please!!!!

sayword said...

Cool app, but for some reason if the barcode number has a letter in it it does not generate a barcode for you. Any ideas or will this be fixed for a future release? I have installed this on my AT&T Tilt2 running WM6.5. Thanks.

Protonus said...

I hope you continue development of this program at some point, so handy! Thanks!

Protonus said...

/subscribe

Jim said...

I fell in love with this but have yet to have a successful scan at any store. I even changed screen protectors to see if I could get a LESS reflective one - but to no avail. ATT Tilt2 (aka Touch Pro 2)

Ulysses said...

Nice initiative. I will also love to see a version which allow us to us the phone camera to "scan" the bar code as well as compatibility with European Shop Card.

Aware and Scared said...

Realize this is an old post & program ... but it was the first instance (after MUCH searching) where I found a WinMo version of this MUCH needed program.

Alas, on my Verizon TouchPro2 (WinMo 6.5) the program did not work at all.

In the new window it only asks for a number and then produces no bar code.

Sirena said...

A nice next step would be to scan the barcodes with the onboard camera.

Sirena from Windows Mobile Development

Vimal said...

i would like to know if anybody aware about how to scan a barcode with the use of camera in windows mobile.....

Bobby said...

how do you install thhis? Sorry, not very savy

Dave said...

It works fairly well on my Samsung Code (SCH-i220).

A few things I noticed, though.

The major one is that when I entered more than 3 barcodes, the 4th one and the ones after that can be accessed by hitting down, but the display doesn't scroll. You have to edit it to see which one you're on. Also, they list in the order entered. They don't alphabetize.

I have one barcode:
42028132093
that asks to compute the checksum. When it does, it comes up with:
4202813209310

One of my barcodes is 16 digits, and I really can't tell if it's doing it correctly. I'm going to have to wait until I go to the store to find out.

The final comment I have is that one of my barcodes has a letter in it and that totally screws up the program. It doesn't like letters at all.

Thanks for your work though. I haven't found anything else like this out there!

Dave