cordova-plugin-qrscanner
cordova-plugin-qrscanner copied to clipboard
feat(ios,android): Adds support for barcodes
This PR adds support for scanning barcodes of various formats. You can use it like this:
QRScanner.prepare((err, status) => {
// ...
}, { formats: [ 'CODE_128', 'QR_CODE', 'EAN_13' ] });
or:
QRScanner.scan((err, text) => {
// ...
}, { formats: [ 'AZTEC', 'QR_CODE', 'PDF_417' ] });
If options object is not provided, it behaves exactly as the original (only QR codes are being recognized).
Please merge this pull-request in.
NOTE that this has been released on NPM as https://www.npmjs.com/package/cordova-plugin-qrscanner-codaxy
@thebarty Hi, Do you know how to handle that with ionic ?
@thebarty Hi, Can you tell how to import it after installation ?
@tymarats does this fork work with browser plattform?
@cyptus Thank you for reaching out via email. Just to reply here as well (based on your inputs), in case someone else has the same question in the future.
As you noticed, the browser platform is using qrcode-reader, and that package apparently does not support barcode scanning. So, the question really is if it can be added to qrcode-reader (in which case we should just update the package dependency and rebuild), or if we can use another library that supports both QR and barcode decoding. Unfortunately, we are not actively maintaining this plugin (and the browser platform was out of our scope to begin with), so it's not likely that anyone from our side will pick it up in the foreseeable future :(