Skip to main content
Scan QR codes or barcodes using the device camera.

Parameters

PropertyTypeRequiredDescription
typeStringNoScan type: qr, bar
successFunctionNoCallback with scan result
failFunctionNoCallback on failure
completeFunctionNoCallback that always executes

Success Callback

PropertyTypeDescription
codeStringScanned content

Code Example

my.scan({
  type: 'qr',
  success: (res) => {
    console.log('Scanned:', res.code);
  }
});