title: Zxing QR Reader doesn't take focus again
body: <p>I have made an App using <strong>zxing library for QR reader</strong>.</p>
  
  <p><strong>My problem is</strong> When the SCAN activity starts it takes focus of whatever is in the view finder and then refuses to take focus again if placed on anything else. Please help.</p>
  
  <h2>main class</h2>
  
  <pre><code>public class main extends Activity {
      final Context context = this;
      final Activity activity = this;
      Button scanButton;
  
      @Override
      public void onCreate(Bundle savedInstanceState) {
          super.onCreate(savedInstanceState);
          setContentView(R.layout.main);
          scanButton = (Button) findViewById(R.id.button1);
          scanButton.setOnClickListener(new OnClickListener() {
  
                  @Override
                  public void onClick(View arg0) {
                      // TODO Auto-generated method stub
  
                      Intent intent = new Intent(
                                                 "com.google.zxing.client.android.SCAN");
                      intent.putExtra("SCAN_MODE", "QR_CODE_MODE");
                      startActivityForResult(intent, 0);
                      // IntentIntegrator integrator = new IntentIntegrator(activity);
                      // integrator.initiateScan();
  
                  }
              });
  
      }
  
      public void onActivityResult(int requestCode, int resultCode, Intent intent) {
          // IntentResult scanResult =
          // IntentIntegrator.parseActivityResult(requestCode, resultCode,
          // intent);
          // if (scanResult != null) { // handle scan result
          // String contents=scanResult.getContents();
          // }
          if (requestCode == 0) {
              if (resultCode == RESULT_OK) {
                  String contents = intent.getStringExtra("SCAN_RESULT");
                  String format = intent.getStringExtra("SCAN_RESULT_FORMAT");
                  // Handle successful scan
                  AlertDialog.Builder alertDialogBuilder = new AlertDialog.Builder(
                                                                                   context);
  
                  alertDialogBuilder.setTitle("Scan Result");
  
                  // set dialog message
                  alertDialogBuilder.setMessage(contents).setPositiveButton("Ok",
                                                                            new DialogInterface.OnClickListener() {
                                                                                public void onClick(DialogInterface dialog, int id) {
                                                                                    // if this button is clicked,
                                                                                    // close
                                                                                    // current activity
                                                                                    dialog.cancel();
                                                                                }
                                                                            });
                  // create alert dialog
                  AlertDialog alertDialog = alertDialogBuilder.create();
                  // show it
                  alertDialog.show();
  
              } else if (resultCode == RESULT_CANCELED) {
                  // Handle cancel
              }
          }
      }
  
  }
  </code></pre>
  
  <h2>manifest.xml</h2>
  
  <pre><code>&lt;?xml version="1.0" encoding="utf-8"?&gt;
  &lt;manifest xmlns:android="http://schemas.android.com/apk/res/android"
              package="com.scanner.demo" android:versionCode="1" android:versionName="1.0"&gt;
  
      &lt;uses-permission android:name="android.permission.CAMERA" /&gt;
      &lt;application android:icon="@drawable/launch_icon"
                     android:label="@string/app_name"&gt;
          &lt;activity android:name=".main" android:label="@string/app_name"
                      android:configChanges="orientation|keyboardHidden"&gt;
              &lt;intent-filter&gt;
                  &lt;action android:name="android.intent.action.MAIN" /&gt;
                  &lt;category android:name="android.intent.category.LAUNCHER" /&gt;
              &lt;/intent-filter&gt;
          &lt;/activity&gt;
          &lt;activity android:name="com.google.zxing.client.android.CaptureActivity"
                      android:screenOrientation="landscape" android:configChanges="orientation|keyboardHidden"
                      android:theme="@android:style/Theme.NoTitleBar.Fullscreen"
                      android:windowSoftInputMode="stateAlwaysHidden"&gt;
              &lt;intent-filter&gt;
                  &lt;action android:name="android.intent.action.MAIN" /&gt;
                  &lt;category android:name="android.intent.category.DEFAULT" /&gt;
              &lt;/intent-filter&gt;
              &lt;intent-filter&gt;
                  &lt;action android:name="com.google.zxing.client.android.SCAN" /&gt;
                  &lt;category android:name="android.intent.category.DEFAULT" /&gt;
              &lt;/intent-filter&gt;
          &lt;/activity&gt;
      &lt;/application&gt;
  &lt;/manifest&gt;
  </code></pre>
  
  <p>I need the camera to take focus again after some time. Where do i make the necessary changes ?</p>