Understanding Barcodes Read When Using the Monaca/Cordova Barcodes Plug-in

Asked 2 years ago, Updated 2 years ago, 71 views

I'm a beginner in app development.
We are developing using Monaca.
I am scanning the barcode using the barcode plug-in (plugins.barcodeScanner.scan) of Cordova, but I can read the JAN code, but I cannot read the GS1 code.
Is it possible to set the GS1 code to be read with this plug-in?
I would appreciate it if you could let me know.
Thank you for your cooperation.

Cordova's BarcodeScanner plug-in is built in as follows:

The following script

function scanBarcode(){
 window.plugins.barcodeScanner.scan(function(result){
  $('#gs1') .val(result.text);
 }, function(error){
  alert("Scanning failed:" + error); 
 });
}

html

<ons-col width="100px">
 bar code 
</ons-col>
<ons-col>
 <ons-button id="scan" modify="cta" onClick="scanBarcode()">scan</ons-button>
 <input type="hidden" id="gs1">
</ons-col>

monaca cordova

2022-09-30 15:44

2 Answers

h2so5 shows how to use BarcodeScaner in Cordova on the link.The link lists (supported) formats that can be read by Cordova's BarcodeScaner for each terminal.

I am not familiar with the barcode format, so I am not sure if I can read the GS1 code.For the time being, it seems that Android and iOS support CODE_128 (GS1-128).
The script provided has all supported formats set to readable by default.
(Default setting if scanAPI option is not specified)
(However, some exceptions are that Android does not support PDF 417/AZTEC by default.)

Answer:

  • If the script provided cannot be read, the GS1 code being asked in the question cannot be read (or configured).


2022-09-30 15:44

The GS1 barcode was originally named RSS (Reduced Space Symbology).
It is designed to be 14 digits long and forward compatible with JAN/EAN/UPC barcodes for easy migration. Also known as RSS14.

RSS Limited,
with the same 14 digits but smaller print size RSS Expanded with additional information as well as 14 digits,
There are many things like stacking multiple barcodes together and calling them Stacked.

In the introduction page of h2so5, RSS14, RSS_EXPANDED corresponds to GS1.
However, the OS support is limited, and as far as I can see, RSS14 only supports Android, Windows 8, Windows Phone 8, and RSS_EXPANDED only supports Android.
You can only read the operating systems you are using.

Also, since the bar code is sold because it can be printed small, the resolution of the camera used is
If the performance and shooting conditions are bad, the recognition rate will not be good even if we support them.


2022-09-30 15:44

If you have any answers or tips


© 2024 OneMinuteCode. All rights reserved.