Capture Event IDs¶
The following array shows the notifications that can be received in the eventNotification callback used during the open Capture.
Capture Events List¶
NAME |
DESCRIPTION |
---|---|
SocketMobile.CaptureEventIds.DeviceArrival |
Device Arrival occurs when a device connects |
SocketMobile.CaptureEventIds.DeviceRemoval |
Device Removal occurs when a device disconnects |
SocketMobile.CaptureEventIds.Terminate |
Terminate is sent when Capture is terminated |
SocketMobile.CaptureEventIds.Error |
A Capture error has occurred |
SocketMobile.CaptureEventIds.DecodedData |
A device has decoded some data |
SocketMobile.CaptureEventIds.Power |
A device power status has changed (not all devices) |
SocketMobile.CaptureEventIds.Buttons |
A device buttons has been pressed (not all devices) |
SocketMobile.CaptureEventIds.BatteryLevel |
A device battery level has changed (not all devices) |
SocketMobile.CaptureEventIds.ListenerStarted |
Capture Bluetooth Classic listener has started |
SocketMobile.CaptureEventIds.DeviceOwnership |
A device ownership has changed (lost or gain) |
SocketMobile.CaptureEventIds.DeviceManagerArrival |
A BLE device manager is ready to be used |
SocketMobile.CaptureEventIds.DeviceManagerRemoval |
A BLE device manager has been remove |
SocketMobile.CaptureEventIds.DeviceDiscovered |
A BLE device has been discovered |
SocketMobile.CaptureEventIds.DiscoveryEnd |
The BLE device discovery has ended |
SocketMobile.CaptureEventIds.CcidStatus |
PC/SC CCID Status notification (not used) |
SocketMobile.CaptureEventIds.DeviceArrival¶
This event is received each time a device connects to the host and has been successfully initialized by capture. Arguments:
id:
SocketMobile.CaptureEventIds.DeviceArrival
,type:
SocketMobile.CaptureEventType.DeviceInfo
,
- value:
name: name of the device,
guid: GUID of the device that can be used to open the device,
type: type of the device
SocketMobile.CaptureEventIds.DeviceRemoval¶
This event is received each time a device has disconnected from the host.
- Arguments:
id:
SocketMobile.CaptureEventIds.DeviceRemoval
,type:
SocketMobile.CaptureEventType.DeviceInfo
,- value:
name: name of the device,
guid: GUID of the device that was used to open the device,
type: type of the device
SocketMobile.CaptureEventIds.Terminate¶
This event is sent when everything has been closed upon the client request.
- Arguments:
id:
SocketMobile.CaptureEventIds.Terminate
,type:
SocketMobile.CaptureEventType.None
,value: n/a
SocketMobile.CaptureEventIds.Error¶
This event is received each time Capture needs to report an error on a non-solicitated operation. A non solicitated operation could be about the Bluetooth Radio that has been turned off, or the Companion Service has been terminated.
- Arguments:
id:
SocketMobile.CaptureEventIds.Error
,type:
SocketMobile.CaptureEventTypes.Ulong
,value: error code.
SocketMobile.CaptureEventIds.DecodedData¶
This event is received each time a device has succesfully decoded some data. This is the same notification for all of Socket Mobile products.
- Arguments:
id:
SocketMobile.CaptureEventIds.DecodedData
type:
SocketMobile.CaptureEventTypes.DecodedData
- value:
id: the data source ID (Symbology ID in case of a barcode scanner, Card Type in case of NFC reader/writer),
name: name of the data source,
data: array of integer containing the decoded data
SocketMobile.CaptureEventIds.Power¶
This event is received when a device power status has changed.
By default a device does not send a Power event unless its notification configuration has been set up for sending such event.
This is not supported on all Socket Mobile devices.
- Arguments:
id:
SocketMobile.CaptureEventIds.Power
type:
SocketMobile.CaptureEventTypes.Ulong
- value: one of these:
SocketMobile.PowerState.Unknown
: the power state is unknown,SocketMobile.PowerState.OnBattery
: the device is running on battery,SocketMobile.PowerState.OnCradle
: the device is on the cradle,SocketMobile.PowerState.OnAc
: the device is plugged to an AC source
SocketMobile.CaptureEventIds.BatteryLevel¶
The device sends this event each time the device battery level has changed.
By default the device does not send this event. The device notification configuration must be set up for the device to send this notification every time the battery level change.
This feature is not supported on all devices. The alternate solution is to query the device battery level periodically.
- Arguments:
id:
SocketMobile.CaptureEventIds.BatteryLevel
type:
SocketMobile.CaptureEventTypes.Ulong
value: refer to Battery Level value.
SocketMobile.CaptureEventIds.ListenerStarted¶
This confirms the correct initialization of the Companion.
- Arguments:
id:
SocketMobile.CaptureEventIds.ListenerStarted
type:
SocketMobile.CaptureEventTypes.None
SocketMobile.CaptureEventIds.DeviceOwnership¶
A device ownership has changed (lost or gain)
- Arguments:
id:
SocketMobile.CaptureEventIds.DeviceOwnership
type:
SocketMobile.CaptureEventTypes.String
- value: ownership GUID (not related to the device GUID).
when this GUID is NULL
00000000-0000-0000-0000-000000000000
, it means the device ownership has been lost and some other application is currently using the device.
The ownership will eventually come back once the other application has close the device.
So in most cases, doing nothing special about this notification is OK.
If the application needs really to regain the ownership of a device, then it can close and reopen the device.
SocketMobile.CaptureEventIds.DeviceManagerArrival¶
A BLE device manager is ready to be used.
The BLE device manager could initiate a BLE device discovery, or start the auto discovery if the device manager favorite property is not empty.
If the BLE device manager is not open, then it won’t try to discover or connect to BLE Socket Mobile devices such as D600 or S550.
Please refer to Using Contactless Reader/Writer for more information about connecting to Socket Mobile Contactless Reader/Writer devices.
- Arguments:
id:
SocketMobile.CaptureEventIds.DeviceManagerArrival
,type:
SocketMobile.CaptureEventType.DeviceInfo
,- value:
name: name of the device manager,
guid: GUID of the device manager that can be used to open the device manager,
type: type of the device manager
SocketMobile.CaptureEventIds.DeviceManagerRemoval¶
A BLE device manager has been removed, often when the Bluetooth Radio of the host has been turned off.
- Arguments:
id:
SocketMobile.CaptureEventIds.DeviceRemoval
,type:
SocketMobile.CaptureEventType.DeviceInfo
,- value:
name: name of the device manager,
guid: GUID of the device manager that was used to open the device manager,
type: type of the device manager
SocketMobile.CaptureEventIds.DeviceDiscovered¶
A BLE device has been discovered by the BLE device manager.
- Arguments:
id:
SocketMobile.CaptureEventIds.DeviceDiscovered
,type:
SocketMobile.CaptureEventType.String
,- value: sperator delimited string that contains:
name: name of the device,
serviceUUID: the UUID of the device service,
identifierUUID: This is the UUID to set the device manager favorite with in order to connect only to this particular device.
An example of the string value could look like this:
{
identifierUUID = "BE495AA0-A93C-4274-9006-F3BC2428ACDF";
name = "Socket D600 [7EF619]";
serviceUUID = "6CB501B7-96F6-4EEF-ACB1-D7535F153CF0";
}
SocketMobile.CaptureEventIds.DiscoveryEnd¶
The BLE device discovery has ended.
- Arguments:
id:
SocketMobile.CaptureEventIds.DiscoveryEnd
,type:
SocketMobile.CaptureEventType.None
,value: n/a
SocketMobile.CaptureEventIds.CcidStatus¶
PC/SC CCID Status notification (not used).