QR code扫描 [英] QR code scanning

查看:212
本文介绍了QR code扫描的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我已经加入据早报<一ZXing核心jar文件href="http://stackoverflow.com/questions/4782543/integration-zxing-library-directly-into-my-android-application">Integration直接ZXing库到我的Andr​​oid应用程序

在我的应用程序,我想创建,根据岗位开始QR读者的意图 QR code扫描仪

in my application i'm trying to create an intent that starts the QR reader according to post QR code scanner

但我找不到CaptureActivity类在core.jar添加?

But i can not find the CaptureActivity class in the core.jar?

如何阅读在我的应用程序QR code,而无需使用任何外部应用程序?

How can I read QR code within my application without using any external application?

谢谢, 的Eyal。

推荐答案

CaptureActivity应该在那里,它只是你还必须将它添加到AndroidManifest.xml中,如果你想运行它,因为这不会延续从罐。添加这个XML

CaptureActivity should be there, it's just that you still have to add it to AndroidManifest.xml if you want to run it because that won't carry over from the jar. Add this XML

<activity android:name="com.google.zxing.client.android.CaptureActivity"
android:screenOrientation="landscape"
android:configChanges="orientation|keyboardHidden"
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>

参考:<一href="http://damianflannery.word$p$pss.com/2011/06/13/integrate-zxing-bar$c$c-scanner-into-your-android-app-natively-using-eclipse/" rel="nofollow">http://damianflannery.word$p$pss.com/2011/06/13/integrate-zxing-bar$c$c-scanner-into-your-android-app-natively-using-eclipse/

(是的,我已经试过此我自己)

(Yes, I have tried this myself)

也请确保您有

<uses-permission android:name="android.permission.CAMERA"/>

这篇关于QR code扫描的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

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