Skip to content

[Bug report] Format 128 1D Barcode with 8 zeroes scanned as 6 zeroes #971

@danielesegato

Description

@danielesegato

Describe the bug
I have a barcode I use for android testing. The ML Kit barcode scanner incorrectly scan it as 000000 instead of 00000000

Image

To Reproduce
Try scanning the above QRCode with this code

val barcodeImage = InputImage.fromFilePath(context, imageUri)
val barcodeScannerOptionsBuilder = BarcodeScannerOptions.Builder()
  .setBarcodeFormats(Barcode.FORMAT_ALL_FORMATS)
  .enableAllPotentialBarcodes()
val scanner = BarcodeScanning.getClient(barcodeScannerOptionsBuilder.build())
scanner.process(barcodeImage)
  .addOnSuccessListener { barcodes ->
    val barcode = barcodes[0].displayValue
    println("Barcode: ${barcode}")
  }

Expected behavior
I expect the barcode to be scanned as 8 zeroes: 00000000
Instead it was scanned as 6 zeroes: 000000.

SDK Info:
com.google.mlkit:barcode-scanning:17.3.0

Smartphone:

  • Device/Simulator: Pixel 4 SDK 36 ARM64 Emulator (using an image from gallery)

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