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

Duplicate QR Code doesn't resolve during Continuous Scanning #119

Closed
JEVietti opened this issue Apr 19, 2022 · 2 comments
Closed

Duplicate QR Code doesn't resolve during Continuous Scanning #119

JEVietti opened this issue Apr 19, 2022 · 2 comments

Comments

@JEVietti
Copy link

Describe the bug
During continuous scanning if you pause after scanning a particular qrcode, then after resume scanning you rescan the same code the promise/scan result doesn't retrigger. If you scan a different qrcode it acts as it should and retriggers after each new scan.

To Reproduce
Steps to reproduce the behavior:

  1. Use continuous scanning
  2. get results and pause
  3. resume scanning after user action, such as closing an alert
  4. scan same code again, unsuccessful no ScanResult is resolved

Expected behavior
After resuming scanning any successful scan should trigger the scanResult promise, during continuous scanning, even repeats.

Screenshots
From the image between the resumeScanning and the startScanning result I tried to rescan the same code, but until I switched to a new code it wouldn't work. This continues to the next where basically the only way to retrigger the scanResult is to alternate and not repeat scanning the same code.

image

Version
v2.1.0

Smartphone (please complete the following information):

  • Device: OnePlus 7T
  • OS: Android 11: Oxygen OS 11.0.6.1.GM21AA
  • Browser: native app
  • Version: Capacitor 3.3.2

Additional context
My suggested solution would to be allow a property to be set in ScanOptions to allowRepeatCodes, or to just use the expected behavior listed above as default behavior.

@JEVietti JEVietti changed the title ResumeScanning doesn't retrigger startScanning result Duplicate QR Code doesn't resolve during Continuous Scanning Apr 19, 2022
@thegnuu
Copy link
Collaborator

thegnuu commented Apr 20, 2022

@JEVietti This issues should be resolved in v2.1.1 which resets the cached last scanned code on resume, can you check it with this version?

@JEVietti
Copy link
Author

@thegnuu Yep v2.1.1 fixes this issue. Thanks!

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

No branches or pull requests

2 participants