Skip to content

1.3 Preferred Settings

In this section, we will discuss the settings of your device connection and how to change them.

Changing connection settings

Your connection settings need to be changed before you are connected to your device. The easiest way to achieve this is by using the didStartConnecting callback function.

override fun didStartConnecting(device: NIMMSTADevice) {
    // Change connection settings here
}
@Override
public void didStartConnecting(NIMMSTADevice nimmstaDevice) {
    // Change connection settings here
}

prefersReconnect

If set to true the device should automatically try to reconnect if the connection is lost.

Default is true.

device.prefersReconnect = true
nimmstaDevice.setPrefersReconnect(true);

reconnectTimeout

Defines the TimeSpan (typically in ms) until no reconnection attempt will occur anymore.

Default is 30 minutes.

device.reconnectTimeout = TimeSpan(1000.0)
device.reconnectTimeout = 20.minutes
nimmstaDevice.setReconnectTimeout(20); // 20 min

prefersShutdownOnCharge

If set to true the scanner should shut down when placed on the charging pad.

Default is false.

device.prefersShutdownOnCharge = false
nimmstaDevice.setPrefersShutdownOnCharge(false);

preferredTriggerMode

Defines when scanning should be triggered.

  • Use the default trigger mode when enabled (DefaultEnabled)
  • By Motion Trigger (Beta), Button Press, and by pressing on the touchscreen (MotionAndButtonAndTouch)
  • By Motion Trigger (Beta) and by pressing on the touchscreen (MotionAndTouch)
  • By Motion Trigger (Beta) and by button press (MotionAndButton)
  • By Motion Trigger (Beta) only (Motion)
  • By Button press and by pressing on the touchscreen (ButtonAndTouch)
  • Only by button press (Button)
  • Only by pressing on the touchscreen (Touch)
  • Disabled (Disabled)

Default is ButtonAndTouch.

device.preferredTriggerMode = ChangeTriggerModeRequest.ScanTriggerMode.ButtonAndTouch
nimmstaDevice.setPreferredTriggerMode(ChangeTriggerModeRequest.ScanTriggerMode.ButtonAndTouch);

preferredPickingMode

Defines if PickingMode is enabled or disabled.

In PickingMode if the button is pressed red crosshairs are shown while no barcodes will be scanned yet. Only the second time scanning is triggered a barcode will be scanned. The crosshairs are disabled after a timeout.

If PickingMode is disabled scanning must be triggered until a barcode is scanned.

Default is Disabled.

device.preferredPickingMode = ChangeTriggerModeRequest.ScanPickingMode.DISABLED
nimmstaDevice.setPreferredPickingMode(ChangeTriggerModeRequest.ScanPickingMode.DISABLED);

Enable Motion Trigger

To enable our motion trigger (Beta), globally, there is a new setting available. It will then always allow for using the motion trigger when the trigger mode allows for the "Button" being triggered.

connectionManager.interpretButtonAsMotionTrigger = true
connectionManager.setInterpretButtonAsMotionTrigger(true);