Activity Level ============== The Activity Level regroups the features that are related to the operation of using the scanner. Enabling or Disabling a Barcode Symbology ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ In the event where there are several type of barcodes close to each other and to avoid scanning the wrong barcode, it might be useful to enable only the barcode symbology or symbologies the application needs. Enabling or Disabling a Barcode Symbology persists in the Scanner. It is best to first read if the Symbology is already enabled before trying to enable it. Here is a code showing how to enable a specific Barcode Symbology:: if let device = lastDevice as CaptureHelperDevice! { device.getSymbologyInfoFromId(.idCode93, withCompletionHandler: { (result: SKTResult, symbology: SKTCaptureSymbology?) in if result == SKTCaptureErrors.E_NOERROR { if let sym = symbology as SKTCaptureSymbology! { if sym.status == .enabled { print("Symbology is enabled then disable it") let newValue = SKTCaptureSymbology() newValue.id = sym.id newValue.flags = .status newValue.status = .disabled device.setSymbologyInfo(newValue, withCompletionHandler: { (result: SKTResult) in print("setting the symbology returned \(result.rawValue)") }) } else { print("Symbology is already disabled \(sym.status.rawValue)") } } } }) } In this code ``lastDevice`` is a ``CaptureHelperDevice`` instance that has been set in the ``didNotifyArrivalForDevice`` delegate. Scanning Through glossy surface such as a windshield ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ TBD Scanning a computer screen ^^^^^^^^^^^^^^^^^^^^^^^^^^ TBD Stand Mode configuration ^^^^^^^^^^^^^^^^^^^^^^^^ Some scanners support the Stand Mode (At this time, the 7Xi, 7Qi and D750). The Stand Mode defines the behavior of the scanner when it's on or off the Charge Stand. There are 4 modes: * Mobile Mode: This is the default mode. In this mode the scanner works like a normal hand held scanner. The reading of a barcode is accomplished by pressing the trigger button. The scanner will try to connect to the host upon startup, until a timeout occurs. * Stand Mode: In Stand mode, the scanner is configured into presentation mode. The presentation mode automatically triggers a barcode read when a barcode is detected in front of the scanner without any other user intervention. In this mode the scanner will try indefinitely to connect to the host. It doesn’t have any timeout to shutdown or hibernate as it assumes it is always powered. * Detect Mode: The Detect mode requires a stand. When the scanner is in position in the stand it switches in presentation mode. A barcode can be automatically read just by presenting it in front of the scanner. The power off timer is disabled, and the scanner tries to connect to the host indefinitely. It can be removed from the stand and it will stay in presentation mode. Barcodes can be read without the need of pressing on the trigger button. Once off the stand, the power off timers become operational and if the scanner is not connected to a host, it will try to connect a few times before giving up. * Auto Mode: This mode is a mix of the Stand mode and the Mobile mode. It behaves as described in the Stand mode when the scanner is in position in the Charge Stand, and it behaves as described in the Mobile mode when the scanner is no longer in position in the stand and the user presses the trigger button. If the trigger button is never pressed while out of the stand, the scanner stays in presentation mode and automatically reads barcodes that are presented in front of it. As soon as the trigger button is pressed while the scanner is not in the stand, it switches to the Mobile mode. It switches back to the presentation mode as soon as it rests on the stand. Following is a sample code that shows how to read the stand mode of a scanner and to change it to **Auto Mode** if necessary:: if let device = lastDevice as CaptureHelperDevice! { device.getStandConfigWithCompletionHandler({ (result: SKTResult, config: SKTCaptureStandConfig?) in print("getting stand mode config returned: \(result.rawValue)") if result == SKTCaptureErrors.E_NOERROR { if var standMode = config as SKTCaptureStandConfig! { print("the stand mode is not set to auto, do it now") if standMode != SKTCaptureStandConfig.autoMode { standMode = .autoMode device.setStandConfig(standMode, withCompletionHandler: { (result: SKTResult) in print("setting stand mode returned: \(result.rawValue)") }) } } } }) } ``lastDevice`` in this code is a ``CaptureHelperDevice`` instance set in the ``didNotifyArrivalForDevice`` delegate. Triggering a Scanner ^^^^^^^^^^^^^^^^^^^^ In some cases it could be convenient to present a Trigger button in the UI (on the screen). Here is a sample of a button handler to trigger a scan:: @IBAction func didPressScanButton(_ sender: Any) { if let device = lastDevice as CaptureHelperDevice! { device.setTrigger(.start, withCompletionHandler: { (result: SKTResult) in print("start the trigger returned \(result.rawValue)") }) } } ``lastDevice`` is a ``CaptureHelperDevice`` instance set in the ``didNotifyArrivalForDevice`` delegate to keep a reference of the last device connected. .. note:: The Scanner Trigger Button can also be disabled or enabled. Please refer to :ref:`Disable the Trigger Scanner Button `.