开发者

Application which uses camera to focus on QR Code

I need to create an android application which pretty much works like a qr code decoder.

I want to use the android phone camera and read only the qr code from the camera preview, and send it to a decoder library probably zxing which gives me the r开发者_如何转开发esult. I don't want to use the zxing intent which uses another application barcode scanner.

I am able to take a picture using phone camera, but I don't know how to read only the qr code part from the preview. I need help in this regard and also how to send the data to decoding library.


That's a pretty tall order to ask for here on SO. My advice would be to study the xzing source at http://code.google.com/p/zxing/ and/or see if you can legitimately incorporate it via the Apache 2.0 license into your project.


ok, this turns to be pretty much simple and requires some effort too.

  1. Download the ZXing source code.

  2. There is a CaputureActivity class , which basically initiates the scan and also displays the result.

  3. You have to work on this class to integrate ZXing scanner in to your application, which pretty much looks like it is part of your app.

  4. There is lot more support in the ZXing reader than just scanning QR-codes and more features, which you might want to eliminate , if you would like to have only QR-code scanner.

HTH.

0

上一篇:

下一篇:

精彩评论

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

最新问答

问答排行榜