Next in line, after the list of Machine Learning APIs that we already went through in the previous weeks, is the Barcode Scanning API. This might be the API that is more and more used in everyday life. When you sit in a café or a restaurant, and you want to order something from the menu, you have a QR code somewhere on the table for you to scan it. After you scan it, the menu will open in your browser and you can select from the list of drinks/meals available. Also, another example is with the WIFI network in cafes, restaurants, when you need to scan a QR in order to connect on the Internet. These are two examples that came to my mind, however, I am sure there are a ton more around us.
Now, let’s get in the technical part of this API and understand how it reads the data that is encoded. First, what is very important, the scanning takes place on the device, so there is no need for network connection. Through barcode scanning you send information from the real word to your application. For example, you can encode structured data like contact information, WiFi and/or menu in a 2D format QR code. When your smartphone scans this QR code it will intelligently recognize the encoded info and will take you directly to the final destination.
Formats of the barcodes
When it comes to the most standard formats, the barcodes can have either linear formats (Codabar, Code 93,EAN-8, etc.) or 2D formats (QR Code, Data Matrix, Aztec, PDF417). When you create the barcode you have the option to scan the info without specifying which format is your preferred. Or, you can speed the scanning process by defining the formats from the very beginning. Structured data, when scanned from 2D codes, will be directly converted to its most readable data format. The types of structured data that can be extracted includes URLs, WIFI, contact information, email addresses, calendar events, geographic location.
Features of the Barcode Scanning API
One of its fantastic features is that regardless of the orientation of the scanning (right-side-up, upside-down, or sideways) the barcode will be recognized on the app. However, not all API recognise all barcode forms. When it comes to ML Kit Barcode Scanning, this API does not support the following forms of barcodes:
- QR codes which are created in the ECI mode;
- Barcodes in ITF format that have up to six characters;
- Barcodes encoded with FNC2, FNC3 or FNC4; and
- 1D Barcodes that have only one character.
If you want to try ML API on your application, you can develop your iOS mobile app with UX Builder. Also, you can contact us for more information on the button bellow.
Have any questions?