title: Trying to call the JavaScript function from Java Source code
body: <p>I am developing an Android App to read the barcode by using the Zxing Barcode reader Plugin.</p>
  
  <p>In the plugin there is an object named window.plugins.barcodeScanner with which we encode/decode the barcode.</p>
  
  <p>I don't wanna use HTML to invoke things instead want the below Javascript function to be called from Java [on click of the image- the below function would be invoked].</p>
  
  <pre><code>function scanCode(){
      window.plugins.barcodeScanner.scan(
          function(result){
              alert("Scanned Code: " + result.text 
                + ". Format: " + result.format
                + ". Cancelled: " + result.cancelled);
          }, 
          function(error){
              alert("Scan failed: " + error);
          }
      );
  }
  </code></pre>
  
  <p>Kindly let me know how to achieve this.</p>