Barcodescan: automatic type detection

  • Eddi
    Participant
      5 years, 9 months ago #17288

      Hello,

      is it possible with the simplifer to scan a barcode independently from the barcode type?

      Regards

      Mathieu Roll
      Keymaster
        Has successfully completed the online course Introduction
        Has successfully completed the online course Intermediate (200)
        Has successfully completed the online course Advanced (300)
        Has successfully completed the online course Basics (100)
      5 years, 9 months ago #17295
      Up
      0
      Down
      ::

      Hello,

      if you don’t know the scan type you have to do this with a script.

      var config = {
      “preferFrontCamera”: false,
      “showFlipCameraButton”: false,
      “prompt”: “”,
      };

      var cbForscanBarcode = function(data) {
      this.setItemValue(“Main”, “Input_Result”, “value”, data.text);
      this.setItemValue(“Main”, “Input_Type”, “value”, data.format);

      }.bind(this);

      var fail = function() {
      console.log(“fail”);
      };

      cordova.plugins.barcodeScanner.scan(cbForscanBarcode, fail, config);

       

      If you want to scan for more than one type. for example QR_CODE and CODE_128 you can do this with the mobile action by giving the types seperated by , as contant in the input mapping.

    Viewing 2 posts - 1 through 2 (of 2 total)

    You must be logged in to reply to this topic.