Launching the native barcode and QR code scanner
Use the scanning action in your mobile app to launch the native scanner on a mobile device. Scanned content is stored in a property that is configured for this action, and users can process the scanned content by using an activity.
At run time, the user interacts with the control to start the scanning functionality of the mobile device. Any other actions in the app are temporarily paused while the scanner is active, and resume once the scan is complete.
Configuring the action
You can add the Scan Barcode/QR Code action to any UI element in a mobile app. In this example, you add this action to a button control.
- In Dev Studio, add a button control by selecting and dragging the control into a section or layout.
- Click the Gear icon for the control to open the Cell Properties window.
- Select the Actions tab.
- Click Create an action set.
- Click Add an event.
- In the Mouse events section, select Click.
- Click Add an action.
- Select the All actions link to expand the list of options, and then in the Launch section, select Scan Barcode/QR Code.
- Specify a text property type for the field. This is the property that is populated with the scanned content value.
- The property does not need to be one referred to using a dot (.), and can be any embedded property, such as: MyPage.myProperty. The property can also be one that takes a row context when inside a grid.
- If the property on the current page is set as Text Input, Text Area, or as any other input control, the value of that control is set first and then is posted to the server. This makes this action a combination of "Set Value" and "Post Value".
- If the property is not specified on the current page (harness), its value is posted directly to the clipboard.
- Click to save your changes, and then save the layout.