Previously, Barcode scanner control has benn used to scan several barcodes in Power Apps.
It is really handy feature for case - such as managing inventory/stocks, but the control can scan only single barcode at single scan and target barcode is automatically "selected" by internal logic if multiple barcodes are exists in camera frame.
Now we have new experimental feature - "Barcode Reader", it is more powerful and can broadly apply to business scenario.
Key property of Barcode Reader
The most distinctive feature of Barcode reader than previous scanner control is maker can choose scanning mode, not only automatic scan single barcode but selecting target or multiple barcodes in scan action.
Scanning mode = Automatically scan
This is compatible with Barcode scanner control, the control will return single barcode data.
Since the type of output property for scanned barcode is as Table, you need to write familiar code to access barcode data:
First(BarcodeReader1.Barcodes).Value
Here, BarcodeReader1.Barcodes
is property storing scanned data, and it is table type.
Scanning mode = Select to scan
If multiple barcodes in single frame, user can select the barcode to scan (return data to app).
In scanning mode (camera), app suggests value of barcode and user can select the barcode by checking green square frame.
To access scanned value, it is same as "Automatically scan" mode - First(...).Value
.
Scanning mode = Scan multiple
This is biggest advantage for use of Barcode reader control.
For multiple barcode, such as registering multiple books to your inventory, user need to repeat same operation, scan -> register -> scan -> register....
With multiple scanning mode, user can scan multiple barcodes in a row.
Also user can review scan result and submit (return to app) selected scan results.
As already commented, BarcodeReader.Barcodes
is table type property, you can display scanned barcodes in gallery and submit multiple results using ForAll action.