Skip to main content


         This documentation site is for previous versions. Visit our new documentation site for current releases.      
 

This content has been archived and is no longer being updated.

Links may not function; however, this content may be relevant to outdated versions of the product.

Launching the native barcode and QR code scanner

Updated on September 10, 2021

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 propertyfield. 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.

Tags

Pega Platform 7.1.1 - 8.3.1 Low-Code App Development Mobile User Experience

Have a question? Get answers now.

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

Did you find this content helpful?

100% found this content useful

Want to help us improve this content?

We'd prefer it if you saw us at our best.

Pega.com is not optimized for Internet Explorer. For the optimal experience, please use:

Close Deprecation Notice
Contact us