Barcodescan: automatic type detection

  • Eddi
    Teilnehmer
      vor 6 Jahren, 1 Monat #17288

      Hello,

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

      Regards

      Mathieu Roll
      Administrator
        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)
      vor 6 Jahren, 1 Monat #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.

    Ansicht von 2 Beiträgen – 1 bis 2 (von insgesamt 2)

    You must be logged in to reply to this topic.