nativescript-plugin-firebase icon indicating copy to clipboard operation
nativescript-plugin-firebase copied to clipboard

When recognizing a QR code from an image, an empty array (NS8 + Angular)

Open Bezlepkin opened this issue 4 years ago • 0 comments

Hi! Trying to recognize the QR code via barcodescanning. scanBarcodesOnDevice. EAN_8 and EAN_13 are working fine.

Nativescript: 8.0.5 @nativescript/firebase: 11.1.3

    return new Promise(resolve => {
      MLKit.barcodescanning.scanBarcodesOnDevice({
        image: imageSource,
        supportInverseBarcodes: true,
        formats: [BarcodeFormat.QR_CODE, BarcodeFormat.EAN_8, BarcodeFormat.EAN_13]
      })
        .then((result: MLKitScanBarcodesOnDeviceResult) => {
          resolve(result);
        })
        .catch(err => {
          this.showErrorMessage(err);
          console.log("ML Kit error: " + err);
        })
    });
  }

Bezlepkin avatar May 27 '21 13:05 Bezlepkin