@Override
    public boolean onKeyDown(int keyCode, KeyEvent event) {
        return barcodeView.onKeyDown(keyCode, event) || super.onKeyDown(keyCode, event);
    }
This sample performs continuous scanning, displaying the barcode and source image whenever
a barcode is scanned.
sample/src/main/java/example/zxing/ContinuousCaptureActivity.java