Close popover

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.

This action can only be used with a mobile app. Attempts to use this control inside of a web browser, desktop application, or in the Mobile Mashup SDK result in an error message.

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.

  1. In Dev Studio, add a button control by selecting Action > Button and dragging the control into a section or layout.
  2. Click the Gear icon for the control to open the Cell Properties window.
  3. Select the Actions tab.
  4. Click Create an action set.
  5. Click Add an event.
    AddAnEventButtonProperties.png
  6. In the Mouse events section, select Click.
  7. Click Add an action.
    ScanBarcodeButtonProperties.png
  8. Select the All actions link to expand the list of options, and then in the Launch section, select Scan Barcode/QR Code.
  9. Specify a text property type for the Scan to property field. This is the property that is populated with the scanned content value.AddAnActionButtonProperties.png
    • 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.
  10. Click OK to save your changes, and then save the layout.

100% found this useful

Have a question? Get answers now.

Visit the Collaboration Center to ask questions, engage in discussions, share ideas, and help others.