title: cordova plugin barcode scanner doesn't open the scan
body: <p>I have a problem with the barcode scanner plugin (I'm not a genius and I don't know well how to programm a web-app.).<br />
  I use phonegap and cordova and I've tried to do a web-app that scan a barcode after a click on a link.<br />
  I've installed the plugin, before with this command line:<br /></p>
  
  <pre><code>cordova plugin add cordova-plugin-barcodescanner
  </code></pre>
  
  <p>and I write this js code: <br /></p>
  
  <pre><code>function scan(){
   cordova.plugins.barcodeScanner.scan(
    function (result) {
        alert("We got a barcode\n" +
              "Result: " + result.text + "\n" +
              "Format: " + result.format + "\n" +
              "Cancelled: " + result.cancelled);
    }, 
    function (error) {
        alert("Scanning failed: " + error);
    }
   );
  }
  </code></pre>
  
  <p>in html:</p>
  
  <pre><code>&lt;a href="javascript:void(0);" onclick="scan()"&gt;Scan&lt;/a&gt;
  </code></pre>
  
  <p>But when I click on the link, It doesn't happen anything.<br />
  If I put an alert after: function scan(){, it show
  if I put an alert after: cordova.plugins.barcodeScanner.scan(, doesn't do anything.<br />
  So, I tried to uninstall the plugin and install it with this command line:</p>
  
  <pre><code>cordova plugin add com.phonegap.plugins.barcodescanner
  </code></pre>
  
  <p>With the same js and html code, but it doesn't work yet.<br />
  So, I uninstall the plugin and I try to install it with:</p>
  
  <pre><code>cordova plugin add https://github.com/wildabeast/BarcodeScanner.git
  </code></pre>
  
  <p>But anything yet.
  I search a lot and I try a lot of solutions!<br />
  I use cordova 5.0.0 and I try the plugin on android 4.4 and IOS.<br />
  I also installed the plugin camera.
  So, please, help me! Where is the error?<br />
  I followed all the solutions that I've find on the web and on stackoverflow.<br />
  The code always crashes after:</p>
  
  <pre><code>cordova.plugins.barcodeScanner.scan(
  </code></pre>
  
  <p>Can anyone help me, please?
  Thank you so much.</p>