Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

bug: Scan QrCode doesn't work on Samsung A23 #140

Open
5 of 11 tasks
JamesDAdams opened this issue Mar 21, 2024 · 7 comments
Open
5 of 11 tasks

bug: Scan QrCode doesn't work on Samsung A23 #140

JamesDAdams opened this issue Mar 21, 2024 · 7 comments

Comments

@JamesDAdams
Copy link

JamesDAdams commented Mar 21, 2024

Plugin(s)

  • Barcode Scanning
  • Face Detection
  • Face Mesh Detection
  • Selfie Segmentation
  • Translation

Version

5.4.0

Platform(s)

  • Android
  • iOS
  • Web

Current behavior

With a Samsung A23 the scan doesn't work (Nothing append)

Expected behavior

qrcode scan work with the Samsung A23

Reproduction

https://github.com/capawesome-team/.capacitor-app

Steps to reproduce

  1. Try to scan a QRcode with a Samsung A23

Other information

My code :

  async scanCode() {
    await BarcodeScanner.requestPermissions();

    const data = await BarcodeScanner.isGoogleBarcodeScannerModuleAvailable();

    if (data.available) {
      const code = await this.startScanner();
      this.importerService.generateDossierFromQRCode(code);
    } else {
      try {
        await BarcodeScanner.installGoogleBarcodeScannerModule();
        const code = await this.startScanner();
        this.importerService.generateDossierFromQRCode(code);
      } catch (e) {
        await this.ui.alertSimple(
          "ERROR"
        );
      }

    }
  }
  
    async startScanner() {
    const { barcodes } = await BarcodeScanner.scan({
      formats: [BarcodeFormat.QrCode, BarcodeFormat.Ean13]
    });
    return barcodes;
  }

  async requestPermissions(): Promise<boolean> {
    const { camera } = await BarcodeScanner.requestPermissions();
    return camera === 'granted' || camera === 'limited';
  }

Capacitor doctor

💊 Capacitor Doctor 💊

Latest Dependencies:

@capacitor/cli: 5.7.4
@capacitor/core: 5.7.4
@capacitor/android: 5.7.4
@capacitor/ios: 5.7.4

Installed Dependencies:

@capacitor/ios: not installed
@capacitor/cli: 5.6.0
@capacitor/core: 5.6.0
@capacitor/android: 5.6.0

[success] Android looking great! 👌

Before submitting

  • I have read and followed the bug report guidelines.
  • I have attached links to possibly related issues and discussions.
  • I understand that incomplete issues (e.g. without reproduction) are closed.
@JamesDAdams JamesDAdams added bug/fix Something isn't working needs: triage labels Mar 21, 2024
@JamesDAdams
Copy link
Author

Someone have a same problem with the same phone with another plugin : juliansteenbakker/mobile_scanner#698

@JamesDAdams
Copy link
Author

After few test the scan work if the qrcode is not center Ex :

image

@JamesDAdams
Copy link
Author

JamesDAdams commented Mar 21, 2024

the getMaxZoomRatio doesn't work for my devices

Sending plugin error: {"save":false,"callbackId":"90822309","pluginId":"BarcodeScanner","methodName":"getMaxZoomRatio","success":false,"error":{"message":"There is no active scan session."}}

@robingenz
Copy link
Member

Thank you for creating the bug report. Unfortunately, I don't have access to this device. Feel free to submit a PR.

@JamesDAdams
Copy link
Author

Thank you for creating the bug report. Unfortunately, I don't have access to this device. Feel free to submit a PR.

There another probleme i have this error for all my phone : There is no active scan session.

Impossible to change the ratio

@JamesDAdams
Copy link
Author

For example GetMaxZoomRatioResult work after the qrcode has been scanned...

@robingenz
Copy link
Member

Please create a separate issue for that.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

2 participants