Skip to main content
Add QR code and barcode scanning to your mobile app using the device camera. Ideal for use cases such as:
  • In-store retail shopping
  • Warehouse and inventory management
  • Data center asset tracking
The Median QR/Barcode Scanner plugin is built on top of customized, open-source libraries and offers full functionality without licensing fees or usage limits.

Underlying open-source technologies

Android: ZXing (Zebra Crossing) library iOS: hyperoslo BarcodeScanner library

UI example

Implementation guide

Once the QR/Barcode Scanner plugin has been added to your app, you may use the following Median JavaScript Bridge commands to access its functionality.

Start a QR/barcode scan

Use median.barcode.scan() to trigger the native scanner. By default, all supported formats trigger a scan. You can pass a formats array to restrict which code types can trigger a scan. If formats is omitted or empty, all supported types are scanned.
The method supports both callback and Promise-based approaches:
The native scanner UI will launch within your app. Upon scan completion, focus will return to the webview where an object in the format below will be returned.
Learn more about using promises and the Median JavaScript Bridge. Supported formats
  • QR Codes (2D): QR_CODE, DATA_MATRIX, AZTEC, PDF_417
  • Barcodes (1D): EAN_13, EAN_8, UPC_A, UPC_E, CODE_39, CODE_93, CODE_128, ITF, CODABAR

Customizing the scanner prompt

You can customize the message shown to users during scanning by setting a prompt in the plugin settings. To do this, go to Native Plugins > QR / Barcode Scanner, as shown below. QR / Barcode Scanner - Custom Prompt Message

Set custom prompt message at runtime

You can also dynamically set the prompt message in-app using the setPrompt() method:
Last modified on December 3, 2026