Scanner

The Scanner action set allows you to use the mobile device's camera to scan barcodes.

Requirements

These actions require the following app versions:

  • Shopify iOS v8.25.0 or above
  • Shopify Android v8.24.0 or above
  • Point of Sale iOS v5.32.0 or above
  • Point of Sale Android v3.25.0 or above

Setup

Create an app and import the Scanner module from @shopify/app-bridge/actions. Note that we'll be referring to this sample application throughout the examples below.

Scanner Capture action

GroupScanner
ActionCAPTURE
Action TypeAPP::SCANNER::CAPTURE
DescriptionDispatches when a scan is successful.

To open a Scanner component, you must first use Feature Detection to check whether it's available. If it is, then you can open it. To learn more about Feature Detection, see Features.

Response

Key Type Description
scanData String? The resulting string from scanning a barcode.

Request access and Open Camera action

GroupScanner
ActionOPEN::CAMERA
Action TypeAPP::SCANNER::OPEN::CAMERA
DescriptionOpens a camera component for scanning barcodes.