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