wildabeast / BarcodeScanner

Official repository now at [phonegap/phonegap-plugin-barcodescanner](http://github.com/phonegap/phonegap-plugin-barcodescanner).
967 stars 740 forks source link

BarcodeScanner in WindowsPhone 8 #244

Open jantonsg opened 9 years ago

jantonsg commented 9 years ago

Hi,

I am developing an app with Cordova 4.2.0. I have build wp8 platform and windows platform. Using wp8 platform I am able to open the camera, but it doesn't scan correctly.

In the other hand, using windows8 platform, first I have had an error reported and solved here: https://github.com/wildabeast/BarcodeScanner/issues/231.

After solve it, I have no errors but I am not able to make it work. var scanner = null;

That's my code:

scanner = cordova.require("cordova/plugin/BarcodeScanner");
scanner.scan( function (result) { 
   //Print result
    console.log( "Scanner result: \n" +
        "text: " + result.text + "\n" +
        "format: " + result.format + "\n" +
        "cancelled: " + result.cancelled + "\n"
    );
}, function (error) {
    console.log("An error appears") 
});

I have been debugging the code, and scanner object is created succesfully but when scan function is called my device (Nokia Lumia 925) is frozen and none of callback functions success or error is executed.

Any help will be welcome... Thanks so much

SingleID commented 9 years ago

Callback is ok only if you use cordova 3.5.0 :-/

venki0552 commented 9 years ago

I am also facing the same issue camera LED is on but no camera screen for scanning codes. Please help