title: Phonegap with barcodescanner issue with screen rotation
body: <p>I'm using PhoneGap 2.2.0 and the barcode plugin <a href="https://github.com/phonegap/phonegap-plugins/tree/master/Android/BarcodeScanner" rel="nofollow">https://github.com/phonegap/phonegap-plugins/tree/master/Android/BarcodeScanner</a> (version 2.0.0)</p>
  
  <p>Here is the index.html:</p>
  
  <pre><code>&lt;!DOCTYPE HTML&gt;
      &lt;html&gt;
      &lt;head&gt;
      &lt;title&gt;Cordova&lt;/title&gt;
      &lt;link rel="stylesheet" type="text/css" href="kkstyle.css" /&gt;
  &lt;script type="text/javascript" charset="utf-8" src="cordova-2.2.0.js"&gt;&lt;/script&gt;
  &lt;script type="text/javascript" charset="utf-8" src="barcodescanner.js"&gt;&lt;/script&gt;
  
  &lt;script type="text/javascript" charset="utf-8"&gt;
      document.addEventListener("deviceready", onDeviceReady, onDeviceReadyFailed);
  
      function onDeviceReady() {
  
      }
  
      function onDeviceReadyFailed() {
          alert("device not ready");
      }
  
      function scanIt() {
  
          window.plugins.barcodeScanner.scan(function(result) {
              alert("We got a barcode\n" + "Result: " + result.text + "\n"
                      + "Format: " + result.format + "\n" + "Cancelled: "
                      + result.cancelled);
              navigator.app.loadUrl("http://m.kelkoo.com/fr/search/"
                      + result.text);
              //http://m.kelkoo.com/fr/search/9782092610954
              //window.location.href = "http://www.kelkoo.fr/ss-"+ result.text +".html";
          }, function(error) {
              alert("Scanning failed: " + error);
          });
  
      }
  &lt;/script&gt;
  
  &lt;/head&gt;
  &lt;body&gt;
      &lt;div data-role="page"&gt;
          &lt;br&gt;&lt;br&gt;&lt;br&gt;
          &lt;div id="camera"&gt;
              &lt;button class="camera-control" onclick="scanIt();"&gt;Scan&lt;/button&gt;
              &lt;div style="text-align: center; margin: 20px;"&gt;
                  &lt;img id="cameraPic" src="" style="width: auto; height: 120px;"&gt;&lt;/img&gt;
              &lt;/div&gt;
          &lt;/div&gt;
      &lt;/div&gt;
  &lt;/body&gt;
  &lt;/html&gt;
  </code></pre>
  
  <p>When I launch this code on my phone(Galaxy S3 under 4.1.1) in landscape mode everything is ok. When I launch this code in portrait mode then the scan bar result is never returned and there is not error message. It just come back to the index.html, if I launch a new time the scan(in landscape) it works.</p>
  
  <p>So I guess that there is a bug with the phone rotation and the phonegap barcode plug in. Someone has a solution please ?</p>