Skip to content

[FEATURE] It will be nice if we will be able to get parsed result also. #301

Open
@2shrestha22

Description

@2shrestha22

Currently scan result only gives code and format. But getting type of result like URL, E-Mail, vCard will be useful.

Firebase ML Vision already have this type of feature;

for (Barcode barcode in barcodes) {
  final Rectangle<int> boundingBox = barcode.boundingBox;
  final List<Point<int>> cornerPoints = barcode.cornerPoints;

  final String rawValue = barcode.rawValue;

  final BarcodeValueType valueType = barcode.valueType;

  // See API reference for complete list of supported types
  switch (valueType) {
    case BarcodeValueType.wifi:
      final String ssid = barcode.wifi.ssid;
      final String password = barcode.wifi.password;
      final BarcodeWiFiEncryptionType type = barcode.wifi.encryptionType;
      break;
    case BarcodeValueType.url:
      final String title = barcode.url.title;
      final String url = barcode.url.url;
      break;
  }
}

https://github.com/zxing/zxing/wiki/Barcode-Contents

For now, would you give me some hint for converting raw data to more readable data type like above?

Metadata

Metadata

Assignees

No one assigned

    Labels

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions