问题描述
我想将 zxing 源代码集成到我的 Android 应用程序中.我已经下载了 zxing1.5 并将整个代码集成到我的应用程序中,我通过意图调用活动"CaptureActivity".
它仅显示相机视图,但未扫描条形码.我该如何解决这个问题 - 我希望我的应用程序是独立的.我不想在设备中单独安装 BarcodeScanner.apk.
推荐答案
我认为 CaptureActivity 不是您想要的 - 相反,您应该使用 com.google.zxing.client.android.SCAN.
请参阅文章如何通过 Intent 从其他 Android 应用程序扫描条形码获取代码示例以及更多相关文章的链接.
其他推荐答案
我能做到!您需要复制 main.xml 中包含
的条目"android:name="com.google.zxing.client.android.SCAN"
问题描述
I want to integrate the zxing source code to my Android application. I have downloaded the zxing1.5 and integrate the whole code to my application and I am calling the activity "CaptureActivity" through intent.
It is showing only the camera view but it is not scanning the barcode. How can I solve this problem - I want my application to be stand alone. I don't want to install BarcodeScanner.apk separately in the device.
推荐答案
I don't think CaptureActivity is what you want - instead, you should be using com.google.zxing.client.android.SCAN.
See the article How to scan a barcode from another Android application via Intents for code samples, and links to further related articles.
其他推荐答案
I could do that! You need to copy the entries in main.xml which contain
"android:name="com.google.zxing.client.android.SCAN"