如何为android paltform禁用zbar中未使用的符号?

如何为android paltform禁用zbar中未使用的符号?,android,barcode,zxing,barcode-scanner,zbar,Android,Barcode,Zxing,Barcode Scanner,Zbar,我已经将android的zbar扫描仪集成到我的应用程序中,我只使用该应用程序扫描QR码,所以现在我想通过禁用未使用的符号(如PDF417代码39等)来优化阅读器,我应该在哪里更改?我一直想知道Symbol.java文件中的数字是什么意思,比如“QRCODE=64”Thx:) 以下是一些核心文件: Config.java Symbol.java SymbolSet.java 像这样: scanner = new ImageScanner(); // disable all symbologies

我已经将android的zbar扫描仪集成到我的应用程序中,我只使用该应用程序扫描QR码,所以现在我想通过禁用未使用的符号(如PDF417代码39等)来优化阅读器,我应该在哪里更改?我一直想知道Symbol.java文件中的数字是什么意思,比如“QRCODE=64”Thx:) 以下是一些核心文件:

Config.java Symbol.java SymbolSet.java 像这样:

scanner = new ImageScanner();
// disable all symbologies first
scanner.setConfig(0, Config.ENABLE, 0);
// only enable QRCODE
scanner.setConfig(Symbol.QRCODE, Config.ENABLE, 1);

使用
setConfig
时,有三个参数都是int。第一个是要使用
symbol
静态属性或对所有符号使用
0
来影响的符号。第二个是要使用
Config
静态属性设置的设置。第三个是设置值。

您到底想做什么?这个问题很可能会被否决,因为它有大量的代码和一个模糊的陈述你想做什么。请编辑问题,以包含解释问题所需的最少代码,以及可以在几段中回答的清晰问题。另请参见帮助页面(链接在每页顶部),了解如何编写好问题。
public class Symbol
{

    public static final int NONE = 0;
    public static final int PARTIAL = 1;
    public static final int EAN8 = 8;
    public static final int UPCE = 9;
    public static final int ISBN10 = 10;
    public static final int UPCA = 12;
    public static final int EAN13 = 13;
    public static final int ISBN13 = 14;
    public static final int I25 = 25;
    public static final int DATABAR = 34;
    public static final int DATABAR_EXP = 35;
    public static final int CODABAR = 38;
    public static final int CODE39 = 39;
    public static final int PDF417 = 57;
    public static final int QRCODE = 64;
    public static final int CODE93 = 93;
    public static final int CODE128 = 128;
    private long peer;
    private int type;

    private static native void init();

    Symbol(long l)
    {
        peer = l;
    }

    protected void finalize()
    {
        destroy();
    }

    public synchronized void destroy()
    {
        if (peer != 0L)
        {
            destroy(peer);
            peer = 0L;
        }
    }

    private native void destroy(long l);

    public int getType()
    {
        if (type == 0)
            type = getType(peer);
        return type;
    }

    private native int getType(long l);

    public native int getConfigMask();

    public native int getModifierMask();

    public native String getData();

    public native byte[] getDataBytes();

    public native int getQuality();

    public native int getCount();

    public int[] getBounds()
    {
        int i = getLocationSize(peer);
        if (i <= 0)
            return null;
        int ai[] = new int[4];
        int j = 0x7fffffff;
        int k = 0x80000000;
        int l = 0x7fffffff;
        int i1 = 0x80000000;
        for (int j1 = 0; j1 < i; j1++)
        {
            int k1 = getLocationX(peer, j1);
            if (j > k1)
                j = k1;
            if (k < k1)
                k = k1;
            int l1 = getLocationY(peer, j1);
            if (l > l1)
                l = l1;
            if (i1 < l1)
                i1 = l1;
        }

        ai[0] = j;
        ai[1] = l;
        ai[2] = k - j;
        ai[3] = i1 - l;
        return ai;
    }

    private native int getLocationSize(long l);

    private native int getLocationX(long l, int i);

    private native int getLocationY(long l, int i);

    public int[] getLocationPoint(int i)
    {
        int ai[] = new int[2];
        ai[0] = getLocationX(peer, i);
        ai[1] = getLocationY(peer, i);
        return ai;
    }

    public native int getOrientation();

    public SymbolSet getComponents()
    {
        return new SymbolSet(getComponents(peer));
    }

    private native long getComponents(long l);

    native long next();

    static
    {
        System.loadLibrary("zbarjni");
        init();
    }
}
public class Modifier
{

    public static final int GS1 = 0;
    public static final int AIM = 1;

    public Modifier()
    {
    }
}
public class SymbolSet extends AbstractCollection
{

    private long peer;

    private static native void init();

    SymbolSet(long l)
    {
        peer = l;
    }

    protected void finalize()
    {
        destroy();
    }

    public synchronized void destroy()
    {
        if (peer != 0L)
        {
            destroy(peer);
            peer = 0L;
        }
    }

    private native void destroy(long l);

    public Iterator iterator()
    {
        long l = firstSymbol(peer);
        if (l == 0L)
            return new SymbolIterator(null);
        else
            return new SymbolIterator(new Symbol(l));
    }

    public native int size();

    private native long firstSymbol(long l);

    static
    {
        System.loadLibrary("zbarjni");
        init();
    }
}
scanner = new ImageScanner();
// disable all symbologies first
scanner.setConfig(0, Config.ENABLE, 0);
// only enable QRCODE
scanner.setConfig(Symbol.QRCODE, Config.ENABLE, 1);