detectBarcode function

  1. @JS('detectBarcode')
void detectBarcode(
  1. String dataUrl,
  2. BarcodeDetectionCallback callback
)

Call the barcode the Javascript detection method Parameters:

  • dataUrl: a valid HTML image data url

  • callback: the function called on barcode result Requires a Javascript file containing a method called "detectBarcode" with the 2 arguments function detectBarcode(dataUrl, callback) {

    call here your favorite javascript barcode scan library input must be an image dataUrl output must be a single String

    callback(barcode);

}

Implementation

@JS('detectBarcode')
external void detectBarcode(String dataUrl, BarcodeDetectionCallback callback);