如何使用ZXing库wihtout安装吧codescanner应用 [英] How to use ZXing library wihtout installing barcodescanner app

查看:258
本文介绍了如何使用ZXing库wihtout安装吧codescanner应用的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我一直在开发一个Android应用程序扫描吧code和QR code和结果发送到其他应用程序(HTTP)。我看过最夸张的互联网的文档,并在这里堆过流,并得到它的工作。我可以能够单独运行的立场我的设备上zxing的Andr​​oid应用程序,还我可以运行自己独立的Andr​​oid应用程序使用Zxing意图扫描吧code。 但即使在这里读这么多的问题和一些在互联网上的博客,我不能让我的严格要求。

I have been developing an android app to scan the barcode and QR code and send the results to some other application (HTTP). I have read most of the documentation over internet and here in stack over flow and got it working. I could able to run the stand alone zxing android app on my device, also I could run my own separate android app to use Zxing intent to scan the bar code. But even after reading so many questions here and some of the blogs in internet, I could not get my strict requirements.

我想实现下面的东西。 1。我不希望安装一个独立的酒吧code扫描仪的应用程序在我的设备得到我自己的应用程序工作(扫描吧code)。 2.我用下面的code

I want to achieve following things. 1. I do not want to install a separate barcode scanner app in my device to get my own app to work (to scan the barcode). 2. I used following code

Intent intent = new Intent("com.google.zxing.client.android.SCAN");
startActivityForResult(intent, 0);

,当我跑在我的devide应用程序,它要求选择应用程序来完成这个动作',它显示谷歌和谷歌眼镜,它会打开谷歌页面默认的摄像头和扫描吧code。我想CaptureActivtiy默认捕获页来(不是谷歌的一个)扫描吧code。 3.我在我自己的应用程序的库上使用ZXing都试过,但没有奏效。

and when I run the app in my devide, it asks 'Select the application to complete this action' and it shows 'Google' and 'Google Goggles' and it opens the Google page default camera and scans the barcode. I wanted CaptureActivtiy default capturing page to come (not Google's one) to scan the bar code. 3. I have tried using ZXing in my own app as library but it did not work.

你能告诉在什么地方我错了得到这个工作?

Could you please tell where exactly I am going wrong to get this done ?

推荐答案

我找到了zxing复杂的使用。然后我试图用ZBar Android版本库。它是如此简单。 你可以从这里下载库:<一href="http://sourceforge.net/p/zbar/news/2012/03/zbar-android-sdk-version-01-released/">http://sourceforge.net/p/zbar/news/2012/03/zbar-android-sdk-version-01-released/

I found "zxing" complicated to use. Then I tried with "ZBar Android Version Library". It was so simple. You can download the library from here: http://sourceforge.net/p/zbar/news/2012/03/zbar-android-sdk-version-01-released/

在下载的程序包,有一个非常简单的例子。只要按照它还是包括例如您的应用程序。希望你的任务将完成。

Within the downloaded package, there is a very simple example. Just follow it or include the example to your app. Hopefully your task will be done.

这篇关于如何使用ZXing库wihtout安装吧codescanner应用的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

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