@Override
    protected void onPause() {
        super.onPause();
        capture.onPause();
    }
Sample Activity extending from ActionBarActivity to display a Toolbar.
sample/src/main/java/example/zxing/ToolbarCaptureActivity.java