Working QR code scanner for PhoneGap

fiberOptics picture fiberOptics · Oct 9, 2014 · Viewed 17.9k times · Source

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:

enter image description here

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.

Answer

Sean Owen picture Sean Owen · Oct 9, 2014

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.