-
-
Notifications
You must be signed in to change notification settings - Fork 39
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
feat: pauseScanning and resumeScanning #180
Comments
In my projects I |
Thank you for your response, @JanMisker . However, in our project, we incorporated validations such as "Serial number is not valid" while scanning the barcode. After throwing the error, we immediately restarted the scan. Previously, we utilised the Capacitor/Community barcode scanner plugin, which has resume and pause scanning capabilities. |
@anusha-kaparapu What exactly are these methods supposed to do? I agree with @JanMisker. You can simply remove the listener and then you will no longer be informed about new barcodes. If you want to continue scanning, then add the listener again. You may have to adapt your code, but the plugin should already provide the functionality you need. |
Thanks for your response @robingenz , As per your suggestion, I did the same implementation once the barcode was scanned. We removed the lister after getting validation, and we initiated listener again for continued scanning. But we are facing some issues while continuing to scan. Please find the attached videos. Some white background is displayed after the lister is removed in between interacting with the listener, again and while continuing to scan, some times the screen gets stuck and stoped the scanning as well. Please find the below code what we have written. the below two videos is @capacitor-mlkit/barcode-scanning plugin issue1.mp4Issue2.mp4The below video is @capacitor-community/barcode-scanner (this is our current existing behaviour for using resume and pause scanning methods). capacitor.community-plugin.mp4Example:
|
@anusha-kaparapu You should only call |
You are calling |
Thanks a lot @robingenz and @JanMisker i followed your instructions and applied, it is working as expected. :) |
@anusha-kaparapu Great, thank you for getting back. @JanMisker Thank you for your help. Feel free to continue contributing to this project in the future. I really appreciated your contributions to the Capacitor Community. In this case i will close this issue. |
Plugin(s)
Current problem
In our project, we have to validate barcode scans in the background while the user is still scanning them. If the validation is invalid, we have to force the user to restart the scanning process rather than aborting it.
We must halt and continue scanning events in order to achieve this.
Preferred solution
pauseScanning and resumeScanning events is required.
Alternative options
No response
Additional context
ionic - 8
Capacitor - 6
@capacitor-mlkit/barcode-scanning - 6.1.0
FYI @robingenz, @JanMisker, @trancee, @jcesarmobile is there any plan to do for feature requests. let me know if any additional details.
Before submitting
The text was updated successfully, but these errors were encountered: