源码项目Android 使用Zxing2.1 来读取二维码
2013-04-23 19:58
429 查看
废话就不多说了,开始。。。
【道谢参考】:http://mukeshyadav4u.blogspot.com/2012/06/integrating-zxing-qr-code-scanner-into.html
用接连给的方法,现发在读功成后之没有回返,然后就看看了源码,到得原因是CaptureActivity是根据起源停止转发理处的,在intent中停止设置起源的Action就好了。
重要程流:
1、载下zxing的源码
用svn checkout http://zxing.googlecode.com/svn/trunk/ 源码
2、将android项目导入到eclipse中,并标记为libproject
3、建创自己的项目,并且用应第二部中的libprpoject
4、在自己的 AndroidManifest.xml 中增长如下的容内:
每日一道理
如果人类不好好保护我们这个赖以生存的地球,终有一天,风沙的肆虐与垃圾的堆积会吞没我们美丽的家园。我向全世界的人们呼吁:让我们从现在开始,从我做起,手挽手,肩并肩共同保护建设我们的家园吧!
5、调用读二维码的服务
我是用一个button来停止演示的
6、在 com.bbcvison.zxing.test.MainActivity.onActivityResult 中停止对读到的二维码停止理处
附件:(刚刚上传功成,但是我在我的资源面里没有找到响应的接连,回首再来编辑这里)
CaptureActivity.rar 是我生成的libproject
CaptureActivityTest.rar 是我的演示程序
再次感激:http://mukeshyadav4u.blogspot.com/2012/06/integrating-zxing-qr-code-scanner-into.html
[全文完]
文章结束给大家分享下程序员的一些笑话语录:
这年头的互联网真是娱乐了中国,网民们从各种各样的“门”里钻来钻去,又有好多“哥”好多“帝”,值得大家品味不已……网络经典语录,关于IT与互联网,经典与您分享!
【道谢参考】:http://mukeshyadav4u.blogspot.com/2012/06/integrating-zxing-qr-code-scanner-into.html
用接连给的方法,现发在读功成后之没有回返,然后就看看了源码,到得原因是CaptureActivity是根据起源停止转发理处的,在intent中停止设置起源的Action就好了。
重要程流:
1、载下zxing的源码
用svn checkout http://zxing.googlecode.com/svn/trunk/ 源码
2、将android项目导入到eclipse中,并标记为libproject
3、建创自己的项目,并且用应第二部中的libprpoject
4、在自己的 AndroidManifest.xml 中增长如下的容内:
<activity android:name="com.google.zxing.client.android.CaptureActivity" android:configChanges="orientation|keyboardHidden" android:screenOrientation="landscape" android:theme="@android:style/Theme.NoTitleBar.Fullscreen" android:windowSoftInputMode="stateAlwaysHidden" > <!-- <intent-filter> <action android:name="android.intent.action.MAIN" /> <category android:name="android.intent.category.DEFAULT" /> </intent-filter> --> <intent-filter> <action android:name="com.google.zxing.client.android.SCAN" /> <category android:name="android.intent.category.DEFAULT" /> </intent-filter> </activity>
每日一道理
如果人类不好好保护我们这个赖以生存的地球,终有一天,风沙的肆虐与垃圾的堆积会吞没我们美丽的家园。我向全世界的人们呼吁:让我们从现在开始,从我做起,手挽手,肩并肩共同保护建设我们的家园吧!
5、调用读二维码的服务
我是用一个button来停止演示的
public void scan(View view){ Intent intent = new Intent(this,CaptureActivity.class); intent.setAction(Intents.Scan.ACTION); intent.putExtra(Intents.Scan.MODE, Intents.Scan.QR_CODE_MODE); intent.putExtra(Intents.Scan.RESULT_DISPLAY_DURATION_MS, 0L); startActivityForResult(intent, 0); }
6、在 com.bbcvison.zxing.test.MainActivity.onActivityResult 中停止对读到的二维码停止理处
附件:(刚刚上传功成,但是我在我的资源面里没有找到响应的接连,回首再来编辑这里)
CaptureActivity.rar 是我生成的libproject
CaptureActivityTest.rar 是我的演示程序
再次感激:http://mukeshyadav4u.blogspot.com/2012/06/integrating-zxing-qr-code-scanner-into.html
[全文完]
文章结束给大家分享下程序员的一些笑话语录:
这年头的互联网真是娱乐了中国,网民们从各种各样的“门”里钻来钻去,又有好多“哥”好多“帝”,值得大家品味不已……网络经典语录,关于IT与互联网,经典与您分享!
相关文章推荐
- Android 使用Zxing2.1 来读取二维码
- Android项目实战(二十八):使用Zxing实现二维码及优化实例
- 二维码识别开源项目zxing的使用和源码分析
- 二维码识别开源项目zxing的使用和源码分析
- Android开源二维码识别项目zxing横屏改为竖屏识别解决方案
- Android二维码功能实现,在程序内嵌入ZXing项目
- Android开源二维码识别项目zxing横屏改为竖屏识别解决方案
- Android开源项目—Zxing的使用
- 【ZXing】Android使用zxing生成二维码图片
- android 中使用Zxing实现二维码的解码和二维码的生成
- android开发(17) 扫描二维码 - 调用第三方APK来实现二维码扫描,参考自 开源项目zxing
- Android:使用ZXing生成二维码(支持添加Logo图案)
- Android使用zxing(二维码工具类)类库的导入方式
- [android开发中使用的小技巧]如何在项目中导入Android源码
- eclipse 导入运行 zxing 项目( android 二维码、条码扫描)
- 【Android开源项目分析】自定义圆形头像CircleImageView的使用和源码分析
- Android QR Code 二维码快速开发——使用ZXing, ZBar
- 在Android上使用ZXing识别条码/二维码
- Android二维码功能实现,在程序内嵌入ZXing项目