Skip to content

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

Open
@aravind3566

Description

@aravind3566

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! 🚀

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions