Skip to main content

ProGlove documentation

Symbologies

The Standalone SDK provides full control over which barcode symbologies are enabled on the scanner. You can enable or disable specific symbologies, adjust their options, and update the scanner configuration directly from your app.

Default symbologies implementation

To modify the symbology configuration on a connected scanner, call updateScannerConfig() from the PgManager.

In the PgCommand, provide an instance of PgScannerConfig, which includes the following parameters:

  • isDefaultScanAckEnabled – Enables or disables the default feedback triggered after every scan (ScanACK/ScanNACK). If set to null, this setting will not be changed by the command. This configuration is not persistent and will reset once the scanner reconnects to another device.

  • symbologies – A list of PgSymbology instances to enable or disable on the scanner. Symbologies not included in the list remain unchanged. Symbology configurations are persistent across sessions but may be modified if the scanner connects to another device. To ensure consistency, it is recommended to call updateScannerConfig() whenever the scanner connects.

PgSymbology represents the symbology you want to update. You can find the full list of available symbologies and their configurable properties here.

PgCommandParams() is optional and can be used to define command execution behavior. The IPgCommandResult interface provides onSuccess() and onError(error: PgError) callbacks for handling command results.

Example:

PgManager.updateScannerConfig(
  config = PgCommand(
    commandData = PgScannerConfig(
      isDefaultScanAckEnabled = true,
      symbologies = listOf(
        PgSymbology.Code128(isEnabled = true),
        PgSymbology.DataMatrix(isEnabled = true, inverted = true),
        PgSymbology.Gs1DataBar(
          isEnabled = true,
          expandedEnabled = true,
          limitedEnabled = false
        )
      )
    ),
    commandParams = PgCommandParams()
  ),
  callback = object : IPgCommandResult {
    override fun onSuccess() {
        // Handle successful scanner configuration update
    }
    override fun onError(error: PgError) {
        // Handle scanner configuration update error
    }
  }
)
Specific symbology API implementation examples
Enable or disable one symbology

Example showing how to enable Code128 symbology with default acknowledgment feedback.

val symbologyList = mutableListOf<PgSymbology>()
val isEnabled = true // set to false to disable
val isDefaultScanAckEnabled = true

symbologyList.add(PgSymbology.Code128(isEnabled))
val pgScannerData = PgScannerConfig(isDefaultScanAckEnabled, symbologyList)
val commandData = PgCommand(pgScannerData)

pgManager.updateScannerConfig(commandData, object : IPgCommandResult {
    override fun onSuccess() {
        // Handle successful configuration
    }
    override fun onError(error: PgError) {
        // Handle configuration error
    }
})
Enable or disable multiple symbologies

Example showing how to enable Code128 and Aztec symbologies while disabling Code39. Default acknowledgment feedback remains enabled.

val symbologyList = mutableListOf<PgSymbology>()
val isDefaultScanAckEnabled = true

symbologyList.add(PgSymbology.Code128(true)) // enable Code128
symbologyList.add(PgSymbology.Code39(false)) // disable Code39
symbologyList.add(PgSymbology.Aztec(true))   // enable Aztec

val pgScannerData = PgScannerConfig(isDefaultScanAckEnabled, symbologyList)
val commandData = PgCommand(pgScannerData)

pgManager.updateScannerConfig(commandData, object : IPgCommandResult {
    override fun onSuccess() {
        // Handle successful configuration
    }
    override fun onError(error: PgError) {
        // Handle configuration error
    }
})
Enable Codabar with special settings

Example showing how to enable Codabar symbology with specific character range (2 to 10), validation settings (CLSI and MD16) and NOTIS transmition check disabled.

val symbologyList = mutableListOf<PgSymbology>()
val isDefaultScanAckEnabled = true

symbologyList.add(
  PgSymbology.Codabar(
      isEnabled = true,
      range = PgSymbologyRange(
          restricted = true,
          min = 2,
          max = 10
      ),
      clsi = true,
      notis = false,
      mod16CheckDigitVerification = true,
      transmitCheckDigit = false
  )
)

val pgScannerData = PgScannerConfig(isDefaultScanAckEnabled, symbologyList)
val commandData = PgCommand(pgScannerData)

pgManager.updateScannerConfig(commandData, object : IPgCommandResult {
    override fun onSuccess() {
        // Handle successful configuration
    }
    override fun onError(error: PgError) {
        // Handle configuration error
    }
})
Best Practices
  • Always call updateScannerConfig() after each scanner connection to ensure symbology settings remain consistent.

  • Avoid disabling all symbologies unless the workflow specifically requires it.

  • Verify that custom symbology configurations are supported by your scanner firmware.

  • Use onError(error: PgError) handling to detect invalid configuration parameters or unsupported symbology types.