Hello,
I would like to make an app read a QR code and parse the values in the app. Is there a ‘preferred’ method for building an app that can read a QR? I did not see any obvious way to capture the code or read it in the samples or here on the forum. Any input on this would be most appreciated. The only topic I could find here is more than 6 years old, I’m not certain its relevant anymore.
Thank you, that’s what I was trying to find out. So, no, NSB has no ‘native’ way to read QR codes that I just overlooked (which Ive been known to do regularly). If I find a good solution that isn’t too complicated I’ll update this post.
There are javascript libraries as well as Cordova plugins that allow you to easily write code to support QR code scanning. I developed an event ticket scanning app with NSB and utilised the onscan.js library
Turns out there is an obvious method I missed. The built-in Voltbuilder and Electron → CordovaBarcode sample is the winner atleast as far as Android is concerned. I presume it works on Apple products as well but I haven’t tested it. Nice and clean solution for scanning QRs and pulling them into your app.
NOTE: Its not obvious from the sample but the Cordova plugin code section from the Config.xml must be copied over to any new apps to enable this functionality. In the future, I think all of the Cordova plugins ought to be checkbox options like the encryption library really, I mean QR scanning is pretty much basic functionality these days.