[Barcode Scanner Plugin] Barcode Scanner Repo Updated

[Barcode Scanner Plugin] Barcode Scanner Repo Updated

  
Forge Component
(4)
Published on 2017-12-03 by leonardo.fernandes
4 votes
Published on 2017-12-03 by leonardo.fernandes

Hey guys,

It looks like this barcode scanner plugin repo was updated on Oct 25th which no longer works on Cordova 6.1.2, currently employed by OutSystems.

I was able to get the plugin to continue working by tagging a specific version (version 6.0.5 was the version that worked well on both Android & iOS; save for the result.cancelled variable in function Scan was being returned as a Number in iOS.

So I commented it out:

So far, everything has gone well since then.



Just a "heads up."


Thanks.

Daniel Brooks wrote:

Hey guys,

It looks like this barcode scanner plugin repo was updated on Oct 25th which no longer works on Cordova 6.1.2, currently employed by OutSystems.

I was able to get the plugin to continue working by tagging a specific version (version 6.0.5 was the version that worked well on both Android & iOS; save for the result.cancelled variable in function Scan was being returned as a Number in iOS.

So I commented it out:

So far, everything has gone well since then.



Just a "heads up."


Thanks.

The error caused by the result.cancelled is this:

Cannot assign a JavaScript number with value 0 to an output parameter of type Boolean Check the JavaScript node 'Scan' of the action 'ScanBarcode'.

I fixed it by setting it to:


$parameters.cancelled = typeof(result.cancelled) === "number" ? !!result.cancelled : result.cancelled;

I have only seen this in version 6.0.5, though.

Thanks.

I have uploaded a new version with those fixes included. Thank you!

Hi guys,

First of all, good job on creating this plugin!

Could you please add to the plugin's description the types of barcode it supports, something like:

The following barcode types are currently supported:

Android

  • QR_CODE
  • DATA_MATRIX
  • UPC_E
  • UPC_A
  • EAN_8
  • EAN_13
  • CODE_128
  • CODE_39
  • CODE_93
  • CODABAR
  • ITF
  • RSS14
  • RSS_EXPANDED

Not by default, but supported if you pass in the "formats" option:

  • PDF_417
  • AZTEC

iOS

  • QR_CODE
  • DATA_MATRIX
  • UPC_E
  • UPC_A
  • EAN_8
  • EAN_13
  • CODE_128
  • CODE_39
  • ITF

This is helpful for someone that is looking for a solution for a specific barcode type.

Thank you in advance.


Cheers, João


Hello João. Could you please create another discussion with that request, as this isn't related to the original subject of this discussion?