Package com.zebra.scannercontrol
Class SDKHandler
java.lang.Object
com.zebra.scannercontrol.SDKHandler
- All Implemented Interfaces:
IDcsSdkApi
Class which acts as a gateway to the SDK
-
Field Summary
Fields -
Constructor Summary
ConstructorsConstructorDescriptionSDKHandler(Context context) SDKHandler(Context context, boolean enableSTCEnabledState) -
Method Summary
Modifier and TypeMethodDescriptionMethod to clear the Bluetooth address stored in SDK.Method to close the communication with SDKdcssdkEnableAutomaticSessionReestablishment(boolean enable, int fromScannerID) Method requests to enable/disable "Automatic communication session reestablishment" option for a particular scanner.dcssdkEnableAvailableScannersDetection(boolean enable) Method requests to enable/disable "Available scanners detection" option.dcssdkEnableBluetoothScannersDiscovery(boolean enable) Method requests to enable/disable "Bluetooth scanners discovery" option.dcssdkEstablishCommunicationSession(int scannerID) Method requests to establish communication session with a particular available scanner.Method provides synchronous execution of a particular method via an opcode.dcssdkExecuteCommandOpCodeInXMLForScanner(DCSSDKDefs.DCSSDK_COMMAND_OPCODE opCode, String inXML, StringBuilder outXML) Method provides synchronous execution of a particular method via an opcode.dcssdkExecuteCommandOpCodeInXMLForScanner(DCSSDKDefs.DCSSDK_COMMAND_OPCODE opCode, String inXML, StringBuilder outXML, int scannerID) Method provides synchronous execution of a particular method via an opcode.dcssdkExecuteSSICommandOpCodeInXMLForScanner(DCSSDKDefs.DCSSDK_COMMAND_OPCODE opCode, String inXML, StringBuilder outXML, int scannerID) Method provides synchronous execution SSI command of a particular method via an opcode.Method to fetch the list of active(connected via bluetooth) scannersdcssdkGetActiveScannersList(List<DCSScannerInfo> activeScannersList) Method to fetch the list of active(connected via bluetooth) scannersMethod to fetch the list of available(paired via bluetooth) scannersdcssdkGetAvailableScannersList(List<DCSScannerInfo> availableScannersList) Method to fetch the list of available(paired via bluetooth) scannersMethod to get the IDCConfig information stored in SDK.dcssdkGetPairingBarcode(DCSSDKDefs.DCSSDK_BT_PROTOCOL bluetoothProtocol, DCSSDKDefs.DCSSDK_BT_SCANNER_CONFIG defaultOption) Method provides pairing barcode for Bluetooth scannersdcssdkGetPairingBarcode(DCSSDKDefs.DCSSDK_BT_PROTOCOL bluetoothProtocol, DCSSDKDefs.DCSSDK_BT_SCANNER_CONFIG defaultOption, String bluetoothMAC) Method provides pairing barcode for Bluetooth scannersMethod provides connection barcode for USB scannersMethod to return the version of the SDK.dcssdkSetBTAddress(String bluetoothMAC) Method to set the Bluetooth address of the device.dcssdkSetDelegate(IDcsSdkApiDelegate delegate) Registers a particular object which conforms toIDcsSdkApiDelegateinterface as a receiver of SDK notifications.dcssdkSetIDCConfig(IDCConfig idcConfig) Method to set the IDC configuration information for SDK.dcssdkSetOperationalMode(DCSSDKDefs.DCSSDK_MODE operationalMode) Method to set the operational mode(If multiple modes are suppoted)dcssdkSetSTCEnabledState(boolean enable) Method set Scanner Control App STC(Scan to connect) enabled state.Method to scan all the currently available Bluetooth Devices.Scan for topology changesMethod to stop current Bluetooth Devices scanning.dcssdkSubsribeForEvents(int sdkEventsMask) Method to enable providing of notifications of requested types.dcssdkTerminateCommunicationSession(int scannerID) Method requests to terminate communication session with a particular active scanner.dcssdkUnsubsribeForEvents(int sdkEventsMask) Method to disable providing of notification of requested types.
-
Field Details
-
BLUETOOTH_MAC_ADDRESS_CHARACTER_COUNT
public static final int BLUETOOTH_MAC_ADDRESS_CHARACTER_COUNT- See Also:
-
MAC_ADDRESS_FORMATTING_REGULAR_EXPRESSION
- See Also:
-
REPLACEMENT_DELIMITER
- See Also:
-
sleepDuration
public static final int sleepDuration- See Also:
-
-
Constructor Details
-
SDKHandler
public SDKHandler(Context context) -
SDKHandler
public SDKHandler(Context context, boolean enableSTCEnabledState)
-
-
Method Details
-
dcssdkSetDelegate
Description copied from interface:IDcsSdkApiRegisters a particular object which conforms toIDcsSdkApiDelegateinterface as a receiver of SDK notifications. Registration of a particular object which conforms toIDcsSdkApiDelegateinterface is required to receive notifications from the SDK.- Specified by:
dcssdkSetDelegatein interfaceIDcsSdkApi- Parameters:
delegate- Delegate which will be implemented by the app- Returns:
- Success/Failure of the operation(One of
DCSSDKDefs.DCSSDK_RESULT)
-
dcssdkClose
Description copied from interface:IDcsSdkApiMethod to close the communication with SDK- Specified by:
dcssdkClosein interfaceIDcsSdkApi- Returns:
- Success/Failure of the operation(One of
DCSSDKDefs.DCSSDK_RESULT)
-
dcssdkGetVersion
Description copied from interface:IDcsSdkApiMethod to return the version of the SDK.- Specified by:
dcssdkGetVersionin interfaceIDcsSdkApi- Returns:
- SDK Version
-
dcssdkGetPairingBarcode
public BarCodeView dcssdkGetPairingBarcode(DCSSDKDefs.DCSSDK_BT_PROTOCOL bluetoothProtocol, DCSSDKDefs.DCSSDK_BT_SCANNER_CONFIG defaultOption, String bluetoothMAC) Description copied from interface:IDcsSdkApiMethod provides pairing barcode for Bluetooth scanners- Specified by:
dcssdkGetPairingBarcodein interfaceIDcsSdkApi- Parameters:
bluetoothProtocol- Protocol to be switcheddefaultOption- Configuration to be usedbluetoothMAC- Bluetooth MAC address to be used- Returns:
BarCodeView
-
dcssdkGetPairingBarcode
public BarCodeView dcssdkGetPairingBarcode(DCSSDKDefs.DCSSDK_BT_PROTOCOL bluetoothProtocol, DCSSDKDefs.DCSSDK_BT_SCANNER_CONFIG defaultOption) Description copied from interface:IDcsSdkApiMethod provides pairing barcode for Bluetooth scanners- Specified by:
dcssdkGetPairingBarcodein interfaceIDcsSdkApi- Parameters:
bluetoothProtocol- Protocol to be switcheddefaultOption- Configuration to be used- Returns:
BarCodeView
-
dcssdkSetBTAddress
Description copied from interface:IDcsSdkApiMethod to set the Bluetooth address of the device. This address will be used when SDK cannot determine Bluetooth MAC address automatically.- Specified by:
dcssdkSetBTAddressin interfaceIDcsSdkApi- Parameters:
bluetoothMAC- Bluetooth MAC address to be used- Returns:
- Success/Failure of the operation(One of
DCSSDKDefs.DCSSDK_RESULT)
-
dcssdkClearBTAddress
Description copied from interface:IDcsSdkApiMethod to clear the Bluetooth address stored in SDK.- Specified by:
dcssdkClearBTAddressin interfaceIDcsSdkApi- Returns:
- Success/Failure of the operation(One of
DCSSDKDefs.DCSSDK_RESULT)
-
dcssdkGetUSBSNAPIWithImagingBarcode
Description copied from interface:IDcsSdkApiMethod provides connection barcode for USB scanners- Specified by:
dcssdkGetUSBSNAPIWithImagingBarcodein interfaceIDcsSdkApi- Returns:
BarCodeView
-
dcssdkStartScanForTopologyChanges
Description copied from interface:IDcsSdkApiScan for topology changes- Specified by:
dcssdkStartScanForTopologyChangesin interfaceIDcsSdkApi- Returns:
- Success/Failure of the operation(One of
DCSSDKDefs.DCSSDK_RESULT)
-
dcssdkSetOperationalMode
Description copied from interface:IDcsSdkApiMethod to set the operational mode(If multiple modes are suppoted)- Specified by:
dcssdkSetOperationalModein interfaceIDcsSdkApi- Parameters:
operationalMode- Operational mode to be set(one ofDCSSDKDefs.DCSSDK_MODE)- Returns:
- Success/Failure of the operation(One of
DCSSDKDefs.DCSSDK_RESULT)
-
dcssdkSubsribeForEvents
Description copied from interface:IDcsSdkApiMethod to enable providing of notifications of requested types.- Specified by:
dcssdkSubsribeForEventsin interfaceIDcsSdkApi- Parameters:
sdkEventsMask- Mask which decides the subscription status- Returns:
- Success/Failure of the operation(One of
DCSSDKDefs.DCSSDK_RESULT)
-
dcssdkUnsubsribeForEvents
Description copied from interface:IDcsSdkApiMethod to disable providing of notification of requested types.- Specified by:
dcssdkUnsubsribeForEventsin interfaceIDcsSdkApi- Parameters:
sdkEventsMask- Unsubscription option flags.- Returns:
- Success/Failure of the operation(One of
DCSSDKDefs.DCSSDK_RESULT)
-
dcssdkGetAvailableScannersList
public DCSSDKDefs.DCSSDK_RESULT dcssdkGetAvailableScannersList(List<DCSScannerInfo> availableScannersList) Description copied from interface:IDcsSdkApiMethod to fetch the list of available(paired via bluetooth) scanners- Specified by:
dcssdkGetAvailableScannersListin interfaceIDcsSdkApi- Parameters:
availableScannersList- List of scanners which should be updated- Returns:
- Success/Failure of the operation(One of
DCSSDKDefs.DCSSDK_RESULT)
-
dcssdkGetAvailableScannersList
Description copied from interface:IDcsSdkApiMethod to fetch the list of available(paired via bluetooth) scanners- Specified by:
dcssdkGetAvailableScannersListin interfaceIDcsSdkApi- Returns:
- List of available scanners)
-
dcssdkStartScanForAvailableDevices
Description copied from interface:IDcsSdkApiMethod to scan all the currently available Bluetooth Devices.- Specified by:
dcssdkStartScanForAvailableDevicesin interfaceIDcsSdkApi- Returns:
- Success/Failure of the operation(One of
DCSSDKDefs.DCSSDK_RESULT)
-
dcssdkStopScanningDevices
Description copied from interface:IDcsSdkApiMethod to stop current Bluetooth Devices scanning.- Specified by:
dcssdkStopScanningDevicesin interfaceIDcsSdkApi- Returns:
- Success/Failure of the operation(One of
DCSSDKDefs.DCSSDK_RESULT)
-
dcssdkGetActiveScannersList
public DCSSDKDefs.DCSSDK_RESULT dcssdkGetActiveScannersList(List<DCSScannerInfo> activeScannersList) Description copied from interface:IDcsSdkApiMethod to fetch the list of active(connected via bluetooth) scanners- Specified by:
dcssdkGetActiveScannersListin interfaceIDcsSdkApi- Parameters:
activeScannersList- List of scanners which should be updated- Returns:
- Success/Failure of the operation(One of
DCSSDKDefs.DCSSDK_RESULT)
-
dcssdkGetActiveScannersList
Description copied from interface:IDcsSdkApiMethod to fetch the list of active(connected via bluetooth) scanners- Specified by:
dcssdkGetActiveScannersListin interfaceIDcsSdkApi- Returns:
- List of active scanners)
-
dcssdkEstablishCommunicationSession
Description copied from interface:IDcsSdkApiMethod requests to establish communication session with a particular available scanner.- Specified by:
dcssdkEstablishCommunicationSessionin interfaceIDcsSdkApi- Parameters:
scannerID- Unique identifier of a particular scanner assigned by SDK- Returns:
- Success/Failure of the operation(One of
DCSSDKDefs.DCSSDK_RESULT)
-
dcssdkTerminateCommunicationSession
Description copied from interface:IDcsSdkApiMethod requests to terminate communication session with a particular active scanner.- Specified by:
dcssdkTerminateCommunicationSessionin interfaceIDcsSdkApi- Parameters:
scannerID- Unique identifier of a particular scanner assigned by SDK.- Returns:
- Success/Failure of the operation(One of
DCSSDKDefs.DCSSDK_RESULT)
-
dcssdkEnableAvailableScannersDetection
Description copied from interface:IDcsSdkApiMethod requests to enable/disable "Available scanners detection" option.- Specified by:
dcssdkEnableAvailableScannersDetectionin interfaceIDcsSdkApi- Parameters:
enable- (true/false) based on whether the option should be enabled or disabled- Returns:
- Success/Failure of the operation(One of
DCSSDKDefs.DCSSDK_RESULT)
-
dcssdkEnableBluetoothScannersDiscovery
Description copied from interface:IDcsSdkApiMethod requests to enable/disable "Bluetooth scanners discovery" option.- Specified by:
dcssdkEnableBluetoothScannersDiscoveryin interfaceIDcsSdkApi- Parameters:
enable- (true/false) based on whether the option should be enabled or disabled- Returns:
- Success/Failure of the operation(One of
DCSSDKDefs.DCSSDK_RESULT)
-
dcssdkSetSTCEnabledState
Description copied from interface:IDcsSdkApiMethod set Scanner Control App STC(Scan to connect) enabled state.- Specified by:
dcssdkSetSTCEnabledStatein interfaceIDcsSdkApi- Parameters:
enable- (true/false) based on whether the option should be enabled or disabled- Returns:
- Success/Failure of the operation(One of
DCSSDKDefs.DCSSDK_RESULT)
-
dcssdkEnableAutomaticSessionReestablishment
public DCSSDKDefs.DCSSDK_RESULT dcssdkEnableAutomaticSessionReestablishment(boolean enable, int fromScannerID) Description copied from interface:IDcsSdkApiMethod requests to enable/disable "Automatic communication session reestablishment" option for a particular scanner.- Specified by:
dcssdkEnableAutomaticSessionReestablishmentin interfaceIDcsSdkApi- Parameters:
enable- true/false for enabling/disablingfromScannerID- identifier of a particular scanner assigned by SDK.- Returns:
- Success/Failure of the operation(One of
DCSSDKDefs.DCSSDK_RESULT)
-
dcssdkExecuteCommandOpCodeInXMLForScanner
public DCSSDKDefs.DCSSDK_RESULT dcssdkExecuteCommandOpCodeInXMLForScanner(DCSSDKDefs.DCSSDK_COMMAND_OPCODE opCode, String inXML, StringBuilder outXML, int scannerID) Description copied from interface:IDcsSdkApiMethod provides synchronous execution of a particular method via an opcode.- Specified by:
dcssdkExecuteCommandOpCodeInXMLForScannerin interfaceIDcsSdkApi- Parameters:
opCode- Opcode for the commandinXML- Relevant argument list for the opcode, structured into an XML string.outXML- Results of method execution, structured into an XML string.scannerID- Unique identifier of a particular scanner assigned by SDK.- Returns:
- Success/Failure of the operation(One of
DCSSDKDefs.DCSSDK_RESULT)
-
dcssdkExecuteCommandOpCodeInXMLForScanner
public DCSSDKDefs.DCSSDK_RESULT dcssdkExecuteCommandOpCodeInXMLForScanner(DCSSDKDefs.DCSSDK_COMMAND_OPCODE opCode, String inXML, StringBuilder outXML) Description copied from interface:IDcsSdkApiMethod provides synchronous execution of a particular method via an opcode.- Specified by:
dcssdkExecuteCommandOpCodeInXMLForScannerin interfaceIDcsSdkApi- Parameters:
opCode- Opcode for the commandinXML- Relevant argument list for the opcode, structured into an XML string.outXML- Results of method execution, structured into an XML string.- Returns:
- Success/Failure of the operation(One of
DCSSDKDefs.DCSSDK_RESULT)
-
dcssdkExecuteCommandOpCodeInXMLForScanner
public String dcssdkExecuteCommandOpCodeInXMLForScanner(DCSSDKDefs.DCSSDK_COMMAND_OPCODE opCode, String inXML) Description copied from interface:IDcsSdkApiMethod provides synchronous execution of a particular method via an opcode.- Specified by:
dcssdkExecuteCommandOpCodeInXMLForScannerin interfaceIDcsSdkApi- Parameters:
opCode- Opcode for the commandinXML- Relevant argument list for the opcode, structured into an XML string.- Returns:
- outXma for execute command with given opcode and inXml.
-
dcssdkExecuteSSICommandOpCodeInXMLForScanner
public DCSSDKDefs.DCSSDK_RESULT dcssdkExecuteSSICommandOpCodeInXMLForScanner(DCSSDKDefs.DCSSDK_COMMAND_OPCODE opCode, String inXML, StringBuilder outXML, int scannerID) Description copied from interface:IDcsSdkApiMethod provides synchronous execution SSI command of a particular method via an opcode.- Specified by:
dcssdkExecuteSSICommandOpCodeInXMLForScannerin interfaceIDcsSdkApi- Parameters:
opCode- Opcode for the commandinXML- Relevant argument list for the opcode, structured into an XML string.outXML- Results of method execution, structured into an XML string.- Returns:
- Success/Failure of the operation(One of
DCSSDKDefs.DCSSDK_RESULT)
-
dcssdkSetIDCConfig
Description copied from interface:IDcsSdkApiMethod to set the IDC configuration information for SDK. This configuration information is used to send either Binary Data event or seperate Image and Barcode events for IDC data.- Specified by:
dcssdkSetIDCConfigin interfaceIDcsSdkApi- Parameters:
idcConfig- IDCConfig Object which has IDC configuration information- Returns:
- Success/Failure of the operation(One of
DCSSDKDefs.DCSSDK_RESULT)
-
dcssdkGetIDCConfig
Description copied from interface:IDcsSdkApiMethod to get the IDCConfig information stored in SDK.- Specified by:
dcssdkGetIDCConfigin interfaceIDcsSdkApi- Returns:
- IDCConfig object(
IDCConfig)
-