Scenario
You want to use a barcode or credit card scanner to add data or search for data in your app.
Use a Scanner to Search and Update
Many applications call for the use of handheld scanners to collect or search for data. Whether you need to scan barcodes to track outbound warehouse stock or scan credit cards at an event where attendees purchase tickets at the door, you have options with Knack!
Most USB-connected scanners function like a keyboard, but only as a single-field input device. What this means is that you will need to select an input field (a record field or a search field) with your mouse, then use the scanner to update or search the field you selected.
A credit card scanner would only record the credit card number - other fields like expiration date will have to be recorded manually.
For example, you can use a barcode scanner with our Inventory Manager app to scan goods in and out and automatically track current stock levels.
While we haven’t tested all of the scanners available on the market, we have verified that this barcode scanner and this credit card scanner work with Knack. Bluetooth-connected scanners that work like a keyboard should also work, but we have not tested any.
If you’re interested in generating scannable barcodes, take a look at this article: Generate Simple Numeric Barcodes Automatically
Use a Mobile Device Camera
To utilize your mobile device camera as a barcode scanner, you will need to implement custom code. Many mobile device cameras do not read barcodes or QR codes out of the box, please consult with your mobile device's manufacturer's guide to confirm if yours does.
In order to integrate such functionality, you will need to use a custom library that can read barcodes using a phone camera (such as QuaggaJS) and integrate it into your own Knack app.
Please note that such libraries are not 100% accurate and do not support every single device, so your mileage may vary.
Our Developer Documentation will help you understand how to use custom code with Knack.
If you are interested in working with a developer who can integrate this into your app, you can search for Knack-vetted experts who will provide estimates on doing the work for you. You're free to engage with any Knack Expert and negotiate the terms that work for you.
Click here to check out our Knack Expert Network.