How to Scan Barcodes in a Glide App
Glide is a no-code app builder which makes it easy to create apps.
Dynamsoft is a partner of Glide to provide it with the barcode scanning feature based on its barcode reading SDK.
In this article, we are going to use Glide to create a demo app which scans barcodes.
Demo video:
In the video, the app scans the ISBN barcodes of books and calculates the total count and total price of books.
Requirements
In order to use Dynamsoft Barcode Reader in Glide. There are two requirements.
- A business or enterprise plan.
- A license of Dynamsoft Barcode Reader (JavaScript Edition). You have to apply for a license here and ask Glide’s support team to set the license up. (No longer needed since 2023.10.18. Check out Glide’s Docs)
New Glide App
-
Open Glide and create a new project for mobile.
-
Choose “Glide Tables” as the data source.
New Table
Create a new table with three columns: barcode, inputter and date.
We are going to log barcodes into this table.
New Screen
Remove existing screens and add a new screen from the table we just created.
Choose “list” as its collection’s style and do not display the image.
Update Input Form
Click the add button on the upper-right corner to show the input form.
Remove the text entries for inputter and date and use the date from special values and the email from user profile values to automatically add the two values.
Add a Scan Barcode Button
In the input form, add a button to call the scan barcode action.
When the button is clicked, it will call the barcode scanner and save the detected barcode to the barcode column.
Use Computed Columns to Add Extra Features
We can use computed columns to make the app more useful.
-
Create a new
Books
table which contains a list of ISBN barcodes of books with their price info. -
In the
Barcodes
table, create a new computed column whose type is “relation” to match the row in theBooks
table by the barcode. -
In the
Barcodes
table, create a new computed column whose type is “lookup” to look up the price info. -
In the
Barcodes
table, create a new computed column whose type is “rollup” to calculate the total price. -
In the
Barcodes
table, create a new computed column whose type is “rollup” to calculate the total number of barcodes. -
In the screen, add fields to display the total price and barcode count.
Online Demo
Check out the online demo to have a try.