EddyVerbruggen / nativescript-plugin-firebase

:fire: NativeScript plugin for Firebase
https://firebase.google.com
MIT License
1.01k stars 448 forks source link

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

Open Bezlepkin opened 3 years ago

Bezlepkin commented 3 years ago

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);
        })
    });
  }