Android的 - 酒吧code扫描,选项? Zxing? [英] Android - Barcode Scanning, Options? Zxing?

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

问题描述

我想创建一个应用程序为Android,这将能够扫描吧codeS,获得包含在酒吧code中的信息,然后可以使用这些信息以某种方式。

I want to create an application for Android that will be able to scan barcodes, get the information contained within the barcode and then be able to use that information in some way.

我不知道如何造就的吧code扫描仪,所以我去了谷歌搜索,似乎Zxing是最常用的方式来实现在一个应用程序,一间酒吧code扫描仪。

I have no idea how to create a barcode scanner so I went Googling and it seems Zxing is the most commonly used way to implement a barcode scanner in an app.

有些链接:

HTTP://$c$c.google.com/p/zxing/

<一个href="http://awalkingcity.com/blog/2008/08/25/qr-$c$cs-made-easy-in-android/">http://awalkingcity.com/blog/2008/08/25/qr-$c$cs-made-easy-in-android/

<一个href="http://stackoverflow.com/questions/2050263/using-zxing-to-create-an-android-bar$c$c-scanning-app">http://stackoverflow.com/questions/2050263/using-zxing-to-create-an-android-bar$c$c-scanning-app

不过,我发现zxing涉及具有当其需要提示用户去市场和安装zxing吧code扫描仪,使我的应用程序可以调用的吧code扫描仪和样品酒吧code扫描仪将返回的信息,以我的应用程序。

However the samples I found on zxing involved having to prompt the user to go to the market and install the zxing barcode scanner so that my app can then call the barcode scanner when its needed and the barcode scanner will then return the info to my app.

虽然这将是一个很好的起点,我,我想知道是否有任何其他选项,让我有嵌入到自己的应用程序酒吧code扫描,而无需提示用户下载一个辅助应用?

While this would be a good starting point for me I was wondering is there any other options that would allow me to have a barcode scanner embedded in my own application without having to prompt the user to download a secondary application?

推荐答案

开发者在这里。我想你会想只通过意图到底集成。你得到了改进,bug修复,以及免费的平台特定的解决方法。这是少得多code了。但我知道你要问的一个替代。

Developer here. I think you're going to want to just integrate via Intent in the end. You get the improvements, bug fixes, and platform-specific workarounds for free. It's much less code too. But I understand you're asking for an alternative.

您可能要剥离下来吧code扫描仪(其来源是Android中/项目)并去掉一切你并不需要。这意味着,仅留下关于 com.google.zxing.client.android com.google.zxing.client.android.camera 包。核心解码是德codeThread ,但其他code。在这些包实现了小回调舞,做连续扫描和获取常用的扫描用户界面

You probably want to strip down Barcode Scanner (whose source is in android/ in the project) and strip out everything you don't need. That means leave only about the com.google.zxing.client.android and com.google.zxing.client.android.camera packages. The core decoding is in DecodeThread, but the other code in these packages implements the little callback dance that does the continuous scanning and gets the usual scanning UI.

如果您嵌入code,你需要遵循的 Apache许可证

If you embed the code you need to follow the terms of the Apache License.

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

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