问题在android的酒吧code扫描仪集成 [英] Problem in integration of bar code scanner in android

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

问题描述

我想从链接zxing的这里

I want to do bar code scanner in android from the link zxing here

但问题是,它显示了摄像头的看法,但它不能扫描棒code image.I我不明白什么是问题?请指点我。

But the problem is,it shows camera view but it can't scanning bar code image.I am not understand what is the problem is?Please guide me.

是否有任何其他程序,而不是上面的链接?

Is there any another procedure rather than above link?

推荐答案

我有同样的问题,当我使用ZXing第一次开始。

I had the same problem when I first started using ZXing.

您需要确保在开始斑马线活动时,您所请求的正确栏code格式。

You need to make sure you are requesting the correct barcode format when starting the ZXing activity.

当调用(根据实施例)

intent.putExtra("SCAN_MODE", "QR_CODE_MODE");

我猜你真的想使用

I'm guessing you actually want to use

intent.putExtra("SCAN_MODE", "PRODUCT_MODE");

请确保您有正确酒吧code格式,按照<一个href=\"http://$c$c.google.com/p/zxing/source/browse/trunk/android/src/com/google/zxing/client/android/Intents.java\"相对=nofollow> Intents.java 文件:

/**
 * By default, sending Scan.ACTION will decode all barcodes that we understand. However it
 * may be useful to limit scanning to certain formats. Use Intent.putExtra(MODE, value) with
 * one of the values below.
 *
 * Setting this is effectively shorthand for setting explicit formats with {@link #FORMATS}.
 * It is overridden by that setting.
 */
public static final String MODE = "SCAN_MODE";

/**
 * Decode only UPC and EAN barcodes. This is the right choice for shopping apps which get
 * prices, reviews, etc. for products.
 */
public static final String PRODUCT_MODE = "PRODUCT_MODE";

/**
 * Decode only 1D barcodes.
 */
public static final String ONE_D_MODE = "ONE_D_MODE";

/**
 * Decode only QR codes.
 */
public static final String QR_CODE_MODE = "QR_CODE_MODE";

/**
 * Decode only Data Matrix codes.
 */
public static final String DATA_MATRIX_MODE = "DATA_MATRIX_MODE";

/**
 * Comma-separated list of formats to scan for. The values must match the names of
 * {@link com.google.zxing.BarcodeFormat}s, e.g. {@link com.google.zxing.BarcodeFormat#EAN_13}.
 * Example: "EAN_13,EAN_8,QR_CODE"
 *
 * This overrides {@link #MODE}.
 */

这篇关于问题在android的酒吧code扫描仪集成的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

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