-
Notifications
You must be signed in to change notification settings - Fork 205
Migrate and upstream BarcodeScanner #386
Comments
Upstream is here: phonegap/phonegap-plugin-barcodescanner#32 |
Since the ZXing c++ port does not have the encoding methods implemented I looked at some JavaScript libraries as Tim suggested. Here are two that I found which look like they might work: The first one is more popular, much smaller and easier to integrate; however it only for making QRcodes. |
From what I can tell, it appears that iOS does QRCode only, but Android can take extra parameters to do any supported pattern. We're probably fine just doing the QRCode only then. |
Okay so I am using https://github.com/davidshimjs/qrcodejs. But I am having a issue.
However when I run the app and
And the data is not returned to client.js. Any suggestions? |
If you open frameworkModules.js while this is added, do you see the qrcode module there? What is it called in the define("...") line? Also, I expect I didn't mention this before, but you want to apply your work to the plugin in this repo: https://github.com/blackberry/phonegap-plugin-barcodescanner, not here, which is older code before we migrated it into the phonegap cross platform one. |
Yes here is the define line:
Oh okay, I will start working off that repo. |
Also what folder should the qrcode.js file go in? I have been placing it in the src folder with index.js. |
I think it should go in src with index.js - but I wonder what the right require() call is. It might actually be just: require('qrcode'); You might have to mess around with it, or even trace the require call to find out. |
I got it working. I have it set up so the encode method returns a 64 bit encoded png image. I just have to do some testing now. |
The only thing I am not sure about is if there is any extra processing I need to do for the different data types (eg. TEXT_TYPE, EMAIL_TYPE, SMS_TYPE,PHONE_TYPE). |
My thought is that those values are used by the Android ZXing encoder to tweak things. Maybe ignore it for now, unless you have time to test it on and Android device or simulator. |
With version 2.0 of the BarcodeScanner, we can now better integrate with the PhoneGap plugin.
Destination repo is here: https://github.com/blackberry/BarcodeScanner
Source is here: https://github.com/blackberry/WebWorks-Community-APIs/tree/master/BB10-Cordova/BarcodeScanner
Planned upstream location is now: https://github.com/hypery2k/cordova-barcodescanner-plugin
The text was updated successfully, but these errors were encountered: