Search in sources :

Example 1 with ImageScanner

use of net.sourceforge.zbar.ImageScanner in project BGAQRCode-Android by bingoogolapple.

the class ZBarView method setupScanner.

public void setupScanner() {
    mScanner = new ImageScanner();
    mScanner.setConfig(0, Config.X_DENSITY, 3);
    mScanner.setConfig(0, Config.Y_DENSITY, 3);
    mScanner.setConfig(Symbol.NONE, Config.ENABLE, 0);
    for (BarcodeFormat format : BarcodeFormat.ALL_FORMATS) {
        mScanner.setConfig(format.getId(), Config.ENABLE, 1);
    }
}
Also used : ImageScanner(net.sourceforge.zbar.ImageScanner)

Example 2 with ImageScanner

use of net.sourceforge.zbar.ImageScanner in project glasquare by davidvavra.

the class QrScanActivity method onCreate.

public void onCreate(Bundle savedInstanceState) {
    super.onCreate(savedInstanceState);
    setContentView(R.layout.activity_scan_qr);
    this.getWindow().addFlags(WindowManager.LayoutParams.FLAG_KEEP_SCREEN_ON);
    autoFocusHandler = new Handler();
    mCamera = getCameraInstance();
    /* Instance barcode scanner */
    scanner = new ImageScanner();
    scanner.setConfig(0, Config.X_DENSITY, 3);
    scanner.setConfig(0, Config.Y_DENSITY, 3);
    mPreview = new CameraPreview(this, mCamera, previewCb, autoFocusCB);
    FrameLayout preview = (FrameLayout) findViewById(R.id.cameraPreview);
    preview.addView(mPreview);
}
Also used : FrameLayout(android.widget.FrameLayout) ImageScanner(net.sourceforge.zbar.ImageScanner) Handler(android.os.Handler)

Example 3 with ImageScanner

use of net.sourceforge.zbar.ImageScanner in project barcodescanner by dm77.

the class ZBarScannerView method setupScanner.

public void setupScanner() {
    mScanner = new ImageScanner();
    mScanner.setConfig(0, Config.X_DENSITY, 3);
    mScanner.setConfig(0, Config.Y_DENSITY, 3);
    mScanner.setConfig(Symbol.NONE, Config.ENABLE, 0);
    for (BarcodeFormat format : getFormats()) {
        mScanner.setConfig(format.getId(), Config.ENABLE, 1);
    }
}
Also used : ImageScanner(net.sourceforge.zbar.ImageScanner)

Aggregations

ImageScanner (net.sourceforge.zbar.ImageScanner)3 Handler (android.os.Handler)1 FrameLayout (android.widget.FrameLayout)1