zxing

Android drawable resource id conflict?

岁酱吖の 提交于 2019-12-19 09:07:30
问题 I've set up the /android project of ZXing 1.7 as a library referenced by my main android app project. As a quick test / proof of concept, I have used the CaptureActivity, in the same manner as described here: http://damianflannery.wordpress.com/2011/06/13/integrate-zxing-barcod... Mostly, things work well, I can launch the CaptureActivity and receive the scanned data in my activity that launched it. However, I get some really strange behaviour, which I think may be related to resource IDs

Getting started with ZXing on Android

空扰寡人 提交于 2019-12-19 03:57:23
问题 I'm trying to add ZXing to my project (add a button which calls the scanner upon press). I found this: http://groups.google.com/group/android-developers/browse_thread/thread/788eb52a765c28b5 and of course the ZXing homesite: http://code.google.com/p/zxing/, but still couldn't figure out what to include in the project classpath to make it all work! As for now, I copied the classes in the first link to my project (with some package name changes), and it runs but crashes after pressing the

Android Using ZXing Generate QR Code

谁都会走 提交于 2019-12-18 12:09:54
问题 I was having some problem when trying to generate QR code in Android Programming. Here is the Tutorial I followed. When my generate button on click, I am calling this method: private void generateQR(){ String qrInputText = "test"; //Find screen size WindowManager manager = (WindowManager) getSystemService(WINDOW_SERVICE); Display display = manager.getDefaultDisplay(); Point point = new Point(); display.getSize(point); int width = point.x; int height = point.y; int smallerDimension = width <

Issue to read multiple barcodes using zxing library

大城市里の小女人 提交于 2019-12-18 06:58:06
问题 I am trying to read 2D Data matrix barcode using zxing library(GenericMultipleBarcodeReader). I have multiple barcodes on a single image. The problem is that the efficiency of the zing reader is very low, it recognizes 1 barcode from image 1.png and no barcode from image 2.png which has 48 barcodes. Is there any way to get 100% efficiency or any other library which results 100% My code to read barcode is: public static void main(String[] args) throws Exception { BufferedImage image = ImageIO

在Android中使用 Google ZXing 实现二维码、条形码扫描

只愿长相守 提交于 2019-12-18 02:46:31
我在项目中用到了二维码扫描的技术,用的是Google提供的ZXing开源项目,它提供二维码和条形码的扫描。扫描条形码就是直接读取条形码的内容,扫描二维码是按照自己指定的二维码格式进行编码和解码。 可以到 http://code.google.com/p/zxing/ 下载ZXing项目的源码,然后按照官方文档进行开发,我这里使用的ZXing是经过简化版的,去除了一些一般使用不必要的文件,项目工程截图如下: 其中encoding包是我在它的基础上自己加上去的,功能是根据传入的字符串来生成二维码图片,返回一个Bitmap,其余的包是ZXing项目自带的。另外对扫描界面的布局我也进行了修改,官方的扫描界面是横向的,我改成了纵向的,并加入了顶部的Tab和取消按钮(camera.xml),另外还需要的一些文件是colors.xml、ids.xml,这些都是原本ZXing项目中自带的,最后就是libs下面的jar包。 先来看看最后的效果: 首先是根据输入的字符串生成二维码图片(左图),然后扫描二维码图片可以在界面上显示扫描结果(右图): 点击Open Camera按钮代开扫描框(左图),扫描条形码结果如下(右图): 接下来看如何使用,首先是把ZXing项目中的一些文件拷贝到我们自己的项目中,然后在Mainifest文件中进行配置权限: <uses-permission android:name

Android二维码开源项目zxing编译

女生的网名这么多〃 提交于 2019-12-18 00:41:39
ZXing是一个开放源代码的,用Java实现的多种格式的1D/2D条码图像处理库,它包括了联系到其它语言的port。Zxing能够实现使用手机的内置的摄像头完毕条形码的扫描及解码。该项目可实现的条形码编码和解码。 眼下支持下面格式: zxing官网说明: https://github.com/zxing/zxing/wiki/Getting-Started-Developing 源代码下载: https://github.com/zxing/zxing 我下载的是releases版本号: https://github.com/zxing/zxing/releases 须要的工具: Ant: http://ant.apache.org/bindownload.cgi Maven: http://maven.apache.org/download.cgi 我下载的是Windows版的。假设是Linux须要下载Linux版。这里仅仅尝试Windows下编译。 下载后在合适的文件夹下解压,将bin文件夹加入到环境变量。跟JDK方法一样。 这里仅仅配置下ant的环境变量 1.我的电脑右键 2.点击“属性” 3.点击“环境变量” 4.点击“编辑” 加入解压后的bin到Path就能够了,记得用;结束。验证下 配置编译 确保你已经有了java执行环境,如JAVA_HOME、CLASSPATH

Reading QRCode with Zxing in Java

雨燕双飞 提交于 2019-12-17 22:24:12
问题 Some questions about using Zxing... I write the following code to read barcode from an image: public class BarCodeDecode { /** * @param args */ public static void main(String[] args) { try { String tmpImgFile = "D:\\FormCode128.TIF"; Map<DecodeHintType,Object> tmpHintsMap = new EnumMap<DecodeHintType, Object>(DecodeHintType.class); tmpHintsMap.put(DecodeHintType.TRY_HARDER, Boolean.TRUE); tmpHintsMap.put(DecodeHintType.POSSIBLE_FORMATS, EnumSet.allOf(BarcodeFormat.class)); tmpHintsMap.put

Embedding ZXing in android app

醉酒当歌 提交于 2019-12-17 17:29:19
问题 So I'm another unlucky android development beginner who needs to have ZXing barcode scanner embedded in his app. There is plenty of questions asking how to do this here on stackoverflow but none of them has an answer that is really understandable and explanatory for a beginner. All the answers say something like "all you have to do is build the core lib of ZXing project, reference it your project and then copy some code from the ZXing's android/directory to your app and you're done". But this

ZXing convert Bitmap to BinaryBitmap

守給你的承諾、 提交于 2019-12-17 15:35:38
问题 I am using OpenCV and Zxing, and I'd like to add 2d code scanning. I have a few types of images that I could send. Probably the best is Bitmat (the other option is OpenCV Mat). It looks like you used to be able to convert like this: Bitmap frame = //this is the frame coming in LuminanceSource source = new RGBLuminanceSource(frame); BinaryBitmap bitmap = new BinaryBitmap(new HybridBinarizer(source)); //then I can use reader.decode(bitmap) to decode the BinaryBitmap However, RGBLuminaceSource

Embed Zxing library without using Barcode Scanner app [duplicate]

半腔热情 提交于 2019-12-16 22:37:32
问题 This question already has answers here : Integrating the ZXing library directly into my Android application (16 answers) Closed 3 years ago . What is the preferred way to embed the zxing library to provide scanning without having the Barcode Scanner app installed? I am looking to embed it in android without having to prompt the user for any extra installs. (Similar to the way the iPhone src works). 回答1: It's really easier to just integrate via Intent. More reliable, and you get updates