Barcode scanner control (retired) in Power Apps
The legacy control for scanning barcodes, QR codes, and data-matrix codes on an Android, iOS, and Windows device.
The barcode scanner control is retired as it is replaced by the barcode reader control. While the legacy barcode scanner's existing functionality will continue to be supported in future versions of Power Apps, the barcode reader includes the latest improvements and should be used where possible.
The barcode scanner control is retired and needs to be enabled to show up in the insert pane.
- Open Settings
- Select Upcoming features in the left-hand menu and select the Retired tab
- Turn on the Legacy barcode scanner setting
The control opens a native scanner on an Android, iOS, and Windows device. The scanner automatically detects a barcode, a QR code, or a data-matrix code when in view. The control doesn't support scanning in a web browser.
The barcode scanner control is supported on an Android, iOS, and Windows device. All other platforms will show a warning that some features of the app won't work.
Value – Output property that contains the text value of the code that was scanned most recently.
Type – Output property that contains the type of the code that was scanned most recently.
OnScan – Actions to perform when a barcode is successfully scanned.
OnCancel – Actions to perform when a barcode scan is canceled by the user.
BarcodeType - The barcode type to scan. You can target multiple barcode types by concatenating them. Ex. BarcodeType.Code128 & BarcodeType.Code39 Default: Auto
PreferFrontCamera - Whether the front-facing camera, when available, is used for scanning.
FlashlightEnabled - Whether the flashlight is enabled automatically when the scanner is opened.
Text - Text that appears on the button that activates the scanner.
BorderColor – The color of a control's border.
BorderStyle – Whether a control's border is Solid, Dashed, Dotted, or None.
BorderThickness – The thickness of a control's border.
DisplayMode – Whether the control allows user input (Edit), only displays data (View), or is disabled (Disabled).
Height – The height of the button that activates the scanner.
Tooltip – Explanatory text that appears when the user hovers over a control.
Type - The type of code that was detected in the scan that succeeded most recently.
Visible – Whether a control appears or is hidden.
Width – The width of the button that activates the scanner.
X – The distance between the left edge of a control and the left edge of its parent container (screen, if no parent container).
Y – The distance between the top edge of a control and the top edge of the parent container (screen, if no parent container).
The same guidelines for the Button control apply to the Barcode scanner control because it's a button that launches the scan.
The barcode scanner is a button that doesn't display the scan result. Consider showing the scan result with a Label control. Set the label's Text property to the barcode scanner's Value property. Set the label's Live property to Polite so that screen-reader users are notified of changes. This change makes the scanned value accessible to everyone, irrespective of visual ability.
Users who have visual and motor disabilities might prefer not to point the camera at a barcode. Consider adding another form of input, such as a Text input control, for users to enter barcodes.
Barcode Availability by Device
|Interleaved 2 of 5||✖||✖||✔|
PDF_417 and AZTEC aren't supported in Auto mode.