@Override
    protected void onPause() {
        super.onPause();
        capture.onPause();
    }
Custom Scannner Activity extending from Activity to display a custom layout form scanner view.
sample/src/main/java/example/zxing/CustomScannerActivity.java