I added the zxing barcode scanner plugin successfully in my Android phonegap application here is the js code where the page shows that I can see the barcode scanner screen.
$('#scanpage').live('pageshow', function (event, ui) { //navigator.notification.alert("Search page"); window.plugins.barcodeScanner.scan( function(result) { //navigator.notification.alert("We got a barcode\n" + "Result: " + result.text + "\n" +"Format: " + result.format + "\n" + // "Cancelled: " + result.cancelled); }, function(error) { navigator.notification.alert("Scanning failed: " + error); }); });
here is the html5 page code
div id="scanpage" data-role="page"> <div data-role="header" class="pageheader"> <div class="height30" style="padding-right:2%;"> <div class="back" style="margin-right:2%;"><a href="#homepage">Back</a></div> <div class="logo2" ><a href="#" ><img src="images/scan.png" style="padding-top:12px;" alt="Scan Code" /></a> </div> </div> </div> <div data-role="content" class="wrapper" style="width:100%"> <div style="background-color:#000000;" > <div style="height:400px;" id="scanarea"></div> <input name="" type="button" class="button" value="Focus and Scan" data-role="none" /> </div> </div> </div>
BUT, how it works, when I open the page, first load the html, but in the second whole screen the barcode scanner window is covered. I want to fix this scan area in the 'scanarea' DIV. But I donβt know how to fix this in a certain area of ββthe div, and when I click the button, the click will execute and read the barcode.
scan window 
html page 
need to show like this: 
Ayesha
source share