Follow

How can I change the symbology length?

Changing the length of the barcodes is done through setActiveSymbolCounts(short[]) on the symbology settings object. Available since SDK version 4.9.0.

short[] counts = new short[10];
short initLength = 12;
for(int i = 0; i < 10; i++){
 counts[i] = initLength;
 initLength++;
}
settings.getSymbologySettings(Barcode.SYMBOLOGY_CODE39).setActiveSymbolCounts(counts);

In 4.8.0 version, only Code 128 length can be set:

ScanditSDKScanSettings settings = ScanditSDKScanSettings.getDefaultSettings();
settings.enableSymbology(ScanditSDKBarcodePicker.Symbology.CODE128);
//Length set
List<Short> counts = new ArrayList<Short>();
counts.add((short)10);
counts.add((short)22);
counts.add((short) 24);
settings.setProperty("code128ActiveSymbolCounts", counts);

For a detailed description see Scandit Android documentation.

 

Was this article helpful?
0 out of 0 found this helpful
Have more questions? Submit a request