开发者

How do I translate a barcode into an integer using the Android API

I am new to programming on the Android and would like to create an app which requires the ability to scan barcodes to function the way I want it to. I found an open source library called zxing, but after some reading around I found that it requires you to have the zxing app on your device in order to use it. I do not want that app to be a requirement for a couple of reasons, but the main one is that I plan on selling my app and feel that a paid app should be fully functional by itself.

A few people in other forums have mentioned that it would not be a trivial task to implement all the features contained within the zxing library, but I do not need all the functionality it has. All I need is the ability to take GTIN-12 or EAN-13 barcodes (I think those are the types of barcodes commonly used on books, cd's and other household items) and convert them to an arbitrary(or not arbitrary) integer. The numbers don't have to be in any way related to the product or what the barcode is actually supposed to represent. I am not interested in using them to look up products or do anything similar to what various other applications can already do well enough.

My problem is开发者_StackOverflow社区 that I don't understand how to process an image taken by the camera in such away that would allow me to do this. For example, how would I crop out the rest of the image (everything besides the barcode itself) and measure the widths of the lines and spaces contained within?


Try http://developer.scanlife.com/products/scanlife-sdk

You will need to register, though, and I don't know what is the level of freedom with that API, but analyzing the barcode from scratch will be no small feat to do, so I suggest you to use one of the available options (like as you mentioned zxing, it would not be the first app that requires a barcode scanner installed)

0

上一篇:

下一篇:

精彩评论

暂无评论...
验证码 换一张
取 消

最新问答

问答排行榜