Deprecation warning

Please note that this is outdated documentation for an older release of the Scandit Barcode Scanner SDK.

We are deprecating the 5.x API on all platforms (except Linux). Release 5.19 in April 2021 will be our final. Applications running 5.x will continue to work, and we will continue to release critical bug fixes and security patches only, for one year. We encourage you to migrate to 6.x and take advantage of our latest / advanced features and improved performance.

You'll find the updated documentation at: Data Capture SDK Documentation for Android

Barcode Generator Settings JSON format

This document describes the JSON format understood by the sc_barcode_generator_set_options() function.

1D Symbologies

  • foregroundColor: 4-tuple of integers [r, g, b, a] with r, g, b and a being in the range [0, 255]
  • backgroundColor: 4-tuple of integers [r, g, b, a] with r, g, b and a being in the range [0, 255]

2D Symbologies

General options

  • foregroundColor: 4-tuple of integers [r, g, b, a] with r, g, b and a being in the range [0, 255]
  • backgroundColor: 4-tuple of integers [r, g, b, a] with r, g, b and a being in the range [0, 255]

QR

  • errorCorrectionLevel: string, may be "L" (up to 7% damage), "M" (up to 15% damage), "Q" (up to 25% damage) or "H" (up to 30% damage). Default correction level is "M".
  • versionNumber: positive integer, overrides desired version number. Version number is automatically chosen if not set. Barcode generation might fail if version number is too small.
  • Example barcode generator settings for QR code:
{
"foregroundColor" : [ 255, 0, 0, 255 ],
"backgroundColor" : [ 0, 0, 255, 255 ],
"errorCorrectionLevel": "Q"
}