This section contains guidelines for the mobile integration of a barcode scanner API in SAP Fiori applications. The general approach for dealing with native app capabilities is to use native user interfaces triggered by an SAPUI5 control whenever possible.
For more information, see mobile integration concept.
Only use the barcode button to read barcodes. For OCR, RFID, and other scanning methods, use independent controllers.
The barcode cannot be read if:
- The scanner is disabled, not functioning, disconnected, or damaged.
- The app is running in a “simple” browser (instead of the SAP Fiori client).
- The SAP Mobile Platform server rendered the scan feature unavailable for the application.
Guidelines for the Scan Button
- Show the barcode button as a standalone button. Do not bundle it with input fields.
- On the button, show an icon. Do not show a text.
- Place the button in the header toolbar, or in the table toolbar for app-specific actions. Only place the button in the content area if the scan action is available for individual items in the list.
Handling When the Barcode Cannot Be Read
Scanning Is the Main Action
Default to an alternative manual input option:
Scanning Is a Secondary Action
If scanning is not a main feature of the app and the barcode cannot be read, do not display the buttons. No warning is required, and a manual default input method is optional. This is also the case if the SAP Mobile Platform server has rendered the scan feature unavailable for the app.
Want to dive deeper? Follow the links below to find out more about related controls, the SAPUI5 implementation, and the visual design.