I have successfully followed this thread
Phonegap 3.0.0: BarcodeScanner Plugin
But it seems like it cannot scan Qr Code. Here is the screen shot from phone:
I have tried scanning a barcode image and it works fine. But not with QR images.
Any idea?
EDIT
var scanner = cordova.require("com.phonegap.plugins.barcodescanner.barcodescanner");
scanner.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);
}
);
EDIT 2
DuuhhH!!! The problem was the QR image, it has no margin as Sean Owen said.
Copying from my comment as it seems to be the answer: That QR code does not have a margin, which is probably why it won't scan.