Skip to main content

ProGlove documentation

Configuration

The Standalone SDK supports setting and managing scanner configurations through configuration files. A configuration file can contain multiple profiles, allowing you to define and switch between different scanner setups as needed.

Configurations can be modified while the scanner is connected, or even when it is offline. If the scanner is not connected, any changes to the active configuration are stored by the Standalone SDK and automatically applied the next time the scanner connects.

Applying configurations

Configuration can be applied in two ways:

  1. Scanning a QR code – Configuration QR codes can be generated and downloaded from the Insight Webportal.Once scanned, the configuration is saved to the Standalone SDK and automatically applied to the connected scanner.

  2. Importing a configuration file – Using the importProGloveConfiguration() method within the Standalone SDK.

Importing a ProGlove.proconfig file

To update the configuration via a file, call importProGloveConfiguration() from the PgManager.

In the PgCommand, provide an instance of PgConfig, which includes the following parameter:

Parameter

Description

byteArray

Raw byte array containing the binary configuration data for the Standalone SDK. This follows the SDK’s internal configuration protocol format.

PgCommandParams() is optional.

Define IPgScannerConfigurationChangeOutput, which contains the callback method:

  • onScannerConfigurationChange(scannerConfigurationChangeResult: PgScannerConfigurationChangeResult)

The callback returns a PgScannerConfigurationChangeResult, which can be:

  • Success – Configuration successfully changed.

  • NoScannerConfiguration – No configuration data present in the selected profile.

  • Unknown – Unknown configuration status.

  • Error – An error occurred while setting the configuration (includes a PgError object).

Example:

PgManager.importProGloveConfiguration(
  pgConfig = PgCommand(
    commandData = PgConfig(
      byteArray = ByteArray
    ),
    commandParams = PgCommandParams()
  ), 
  callback = object : IPgScannerConfigurationChangeOutput {
     override fun onScannerConfigurationChange(scannerConfigurationChangeResult: PgScannerConfigurationChangeResult) {
        // Handle configuration update result
     }
  }
)
Getting configuration profiles

To retrieve all configuration profiles currently active in the imported configuration, call getConfigProfiles() from the PgManager. This method does not require any parameters — only a callback.

Define IPgGetConfigProfilesCallback, which contains:

  • onConfigProfilesReceived(profiles: Array<PgConfigProfile>)

Each PgConfigProfile object represents a configuration profile and includes:

  • profileId – Unique ID of the profile.

  • isActive – Indicates whether the profile is currently active.

Example:

PgManager.getConfigProfiles(callback = object : IPgGetConfigProfilesCallback {
    override fun onConfigProfilesReceived(profiles: Array<PgConfigProfile>) {
        // Handle returned configuration profiles
    }
})
Clearing ProGlove configuration

To remove all configurations and clear the configuration database, call clearProGloveConfiguration() from the PgManager. This operation deletes all profiles and resets the configuration state.

The method only requires a callback implementing IPgScannerConfigurationChangeOutput.

When the operation completes, the callback PgScannerConfigurationChangeResult returns one of the following results:

  • Success – Configuration successfully cleared.

  • NoScannerConfiguration – No configuration was present.

  • Unknown – Unknown configuration status.

  • Error – An error occurred (includes a PgError object).

Example:

PgManager.clearProGloveConfiguration(callback = object : IPgScannerConfigurationChangeOutput {
    override fun onScannerConfigurationChange(scannerConfigurationChangeResult: PgScannerConfigurationChangeResult) {
        // Handle result after clearing configurations
    }
})
Changing the configuration profile

If your configuration includes multiple profiles, you can switch between them by calling changeConfigProfile() from the PgManager.

Profiles can be changed whether the scanner is connected or not:

  • If connected, the configuration is applied immediately.

  • If disconnected, the change is stored and automatically applied when the scanner reconnects.

In the PgCommand, provide an instance of PgConfigProfile, specifying the profileId of the target profile. PgCommandParams() is optional.

Define IPgConfigProfileCallback to handle the result. The callback provides:

  • onConfigProfileChanged(profile: PgConfigProfile) – Called when the profile has been successfully switched.

  • onError(error: PgError) – Called if the operation fails.

Example:

PgManager.changeConfigProfile(
  command = PgCommand(
    commandData = PgConfigProfile(profileId = "idOfTheProfileWeWantToChangeTo"),
    commandParams = PgCommandParams()
  ),
  callback = object : IPgConfigProfileCallback {
      override fun onConfigProfileChanged(profile: PgConfigProfile) {
          // Handle new active profile
      }
      override fun onError(error: PgError) {
          // Handle error
      }
  }
)
Best Practices
  • Always import configurations through the Standalone SDK rather than manually modifying scanner parameters.

  • Re-import configurations after firmware or Standalone SDK updates to ensure compatibility.

  • Store configuration profiles in your app’s secure storage if you need to reapply them programmatically.

  • Avoid clearing configurations unless a full reset is required — this operation removes all stored profiles.