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

Upgrade Barcode Scanning Dependency to 17.3.0 and Add Auto-Zoom Feature for QR Code Scanning #697

Open
aravind3566 opened this issue Feb 8, 2025 · 0 comments

Comments

@aravind3566
Copy link
Contributor

Is your feature request related to a problem? Please describe.
I'm frustrated with the current QR code scanning performance, especially when scanning small, distant, or blurry QR codes. The existing implementation lacks an auto-zoom feature, which makes it challenging to detect QR codes quickly and accurately in such conditions.

Describe the solution you'd like
I’d like to request two improvements:

1. Upgrade the ML Kit Barcode Scanning dependency to the latest version:

implementation 'com.google.mlkit:barcode-scanning:17.3.0'

This version offers performance enhancements and new features, including auto-zoom support.

1. Add Auto-Zoom functionality for QR code scanning using ZoomSuggestionOptions. This feature automatically adjusts the zoom level to improve QR code detection, especially for small or unclear codes. Here’s an example implementation:

val options = BarcodeScannerOptions.Builder()
    .setBarcodeFormats(Barcode.FORMAT_QR_CODE)
    .setZoomSuggestionOptions(
        ZoomSuggestionOptions.Builder(zoomCallback)
            .setMaxSupportedZoomRatio(maxSupportedZoomRatio)
            .build()
    ) // Optional
    .build()

Auto-Zoom Demo

Describe alternatives you've considered

  1. Manually adjusting the zoom level via custom camera logic, which is less efficient and doesn’t provide the smooth experience that ZoomSuggestionOptions offers.
  2. Using third-party libraries for QR scanning, but this adds unnecessary dependencies and complexity to the project.

Additional context
Upgrading to 17.3.0 and integrating auto-zoom will significantly improve QR code scanning accuracy and user experience. This feature is particularly useful in real-world scenarios like scanning QR codes from posters, receipts, or screens where manual zooming isn’t ideal.

Thank you for considering this feature request! 🚀

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

1 participant