如何使用zxing作为核心库在我的Andr​​oid项目? [英] How to use zxing core as library on my Android project?

查看:123
本文介绍了如何使用zxing作为核心库在我的Andr​​oid项目?的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我建设使用zxing库Android的扫描应用程序。我已经建立了zxing核心,包括core.jar添加到我的应用程序的构建路径。我不想使用这个网址提供的意图的解决方案。HTTP://$c$c.google.com/p/zxing/wiki/ScanningViaIntent

I'm building the Android scanning app using zxing library. I have built the zxing core and included the core.jar into my application build path. I don't want to use the intent solution provided in this url "http://code.google.com/p/zxing/wiki/ScanningViaIntent".

我的问题是:我怎样才能打开摄像头,捕捉有争议的图片,并传递给zxing核心库脱code时,当去code方法返回成功停止摄像,并打印出结果?

My question is: How can I open the camera, capture the contentious images and pass to zxing core library to decode it, when the decode method return the success stop the camera and print the result?

我发现下面的链接有用我:的http://www.arp123.com/post/Identified-in-the-Android-use-ZXing-bar$c$c-QR-$c$c.html但我有连续扫描问题。相较于zxing 1.6的Andr​​oid吧code扫描仪应用程序,我的解决办法是不好的。如果有人能帮助我或者指导我整理了这一点,我真的AP preciate吧。

I found the following link useful for me: http://www.arp123.com/post/Identified-in-the-Android-use-ZXing-barcode-QR-Code.html But I'm having problems in continuous scanning. When compared to zxing 1.6 Android barcode scanner app my solution is not good. If someone can help me or guide me to sort this out I would really appreciate it.

推荐答案

我所做的是对核心文件夹导出到一个罐子,因为在我的项目库使用。他们从Android客户端文件夹,我用的相机包和最从client.android包的类(只有一个活动依然不过,captureActivity)。我在相机或Android包删除了EN code,历史,因此,共享和WiFi套餐,并取消该包的任何引用。

What I did was to export the core folder to a jar and use as a library in my project. Them from the android client folder I use the camera package and the most of the classes from the client.android package (only one activity remained though, captureActivity). I deleted the encode, history, result, share and wifi package and removed any references of this packages in the camera or android package.

我把剩下的类(摄像头和Android类),我结合他们到我的项目

I took the remaining classes (camera and android classes) and I integrated them into my project

感谢

这篇关于如何使用zxing作为核心库在我的Andr​​oid项目?的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆