C#-Wrapper
This section explains how you use the C#-wrapper to integrate .NET Desktop Applications with SDK for Windows.
The .NET Application addresses the C library through a C# wrapper.
Device Service
The Device Service reports connected Jabra devices that support telephony.
Access and use the Device Service as shown below:
private IServiceFactory ServiceFactory;
public static IDeviceService MyDeviceService;
void LoadSDK()
{
// Get a device service interface
ServiceFactory = new ServiceFactory();
ServiceFactory.SetClientId(""); // Your Partner Key as provided from developer.jabra.com
DeviceService = ServiceFactory.CreateDeviceService();
// Subscribe for device added, removed, raw button input, translated button input, first scan done etc.
DeviceService.FirstScanDone += DeviceService_FirstScanDone;
DeviceService.DeviceAdded += DeviceService_DeviceAdded;
DeviceService.DeviceRemoved += DeviceService_DeviceRemoved;
DeviceService.RawButtonInput += DeviceService_RawButtonInput;
DeviceService.TranslatedButtonInput += DeviceService_TranslatedButtonInput;
}
private void DeviceService_TranslatedButtonInput(object sender, TranslatedButtonInputEventArgs e)
{
throw new NotImplementedException();
}
private void DeviceService_RawButtonInput(object sender, RawButtonInputEventArgs e)
{
throw new NotImplementedException();
}
private void DeviceService_DeviceRemoved(object sender, DeviceRemovedEventArgs e)
{
throw new NotImplementedException();
}
private void DeviceService_FirstScanDone(object sender, EventArgs e)
{
throw new NotImplementedException();
}
private void DeviceService_DeviceAdded(object sender, DeviceAddedEventArgs e)
{
throw new NotImplementedException();
}
Users can also provide the optional parameters for configuring the SDK at initialization using IConfigurationParams
.
Subscriptions
Available subscriptions are:
Subscription | Description |
---|---|
BluetoothPairingList |
Provides list of paired Jabra devices. |
ButtonConfigurationInput |
Event triggered when a button input has been provided (from a device supporting button configuration/Remote MMI). |
DeviceAdded |
Event triggered when a Jabra device has been added (after first scan). |
DeviceRemoved |
Event triggered when a Jabra device has been removed. |
FirstScanDone |
Event triggered after first scan for connected Jabra devices. |
FileUploadProgressInput |
Event triggered for the progress of a file upload. |
FirmwareUpdateProgressInput |
Event that informs about a firmware update progress. |
RawButtonInput |
Event that provides the USB HID data of a received button input. |
TranslatedButtonInput |
Event that provides Jabra SDK ButtonId of a received button input. |
SetFirmwareUpdaterPath() to be called to set the path to the firmware updater executable that will be invoked when updating the device.
User needs to subscribe for LoggingEvent to log the events like:
DEVICE CONNECTED
DEVICE DISCONNECTED
BATTERY STATUS CHARGING
BATTERY STATUS LOW
BATTERY STATUS LEVEL
Audio Link
For wireless headsets, the radio link between the headset and its base or Bluetooth USB adapter is usually closed if there are no active calls. This is done to preserve battery time.
When the radio link is closed, there is no audio path between the headset and its base or Bluetooth USB adapter.
If you want audio to and from the headset outside calls, you can manually open and close an audio (radio) link with the method SetAudioLinkState().
Bluetooth Adapter Interface
The Jabra Bluetooth adapter interface is used to connect a Bluetooth device with the Jabra Bluetooth adapter.
The following methods are available in this interface:
Methods | Description |
---|---|
ConnectDevice |
Connects to Bluetooth device using Bluetooth address of supported devices. |
DisconnectDevice |
Disconnects the Bluetooth device from the Bluetooth adapter. |
IsAutoPairing |
Checks whether the pairing status is set to auto mode. |
SetAutoPairing |
Sets the pairing status to auto or vice versa. |
StartPairing |
Starts pairing and connects with the first found Bluetooth device. |
SearchForDevicesInPairingMode |
Starts the search process for nearby Bluetooth devices in pairing mode. |
ClearPairing |
Clears the pairing details from the Jabra Link 360 Bluetooth adapter. |
GetConnectedDeviceName |
Gets the name of the device connected to the Bluetooth adapter. |
IsPairingListSupported |
Indicates whether the Bluetooth adapter supports pairing list. |
GetPairedDevice |
Gives the list of paired devices. |
ConnectPairedDevice |
Connects the Bluetooth adapter to the paired device. |
DisconnectPairedDevice |
Disconnects the paired device from the Bluetooth adapter. |
ClearPairedDevice |
Clears the paired device information from the list of paired devices. |
Button Events Interface
The button events interface enables the user to configure Button Events in Jabra devices. IsButtonConfigurationSupported property reports whether the device supports configuration of button events.
The other methods provided by button event interface are:
Methods | Description |
---|---|
GetConfigurableButtons |
Get the list of user configurable button events of the device. |
SetConfigurableButtons |
Updates the user configured button events on the supported device. |
ResetConfigurableButtons |
Clears the user configured button events on the supported device. |
Remote MMI v2 Interface (Button Configuration)
Remote MMIv2 is used for controlling buttons and LEDs of supported Jabra devices.
Methods provided by this interface are:
Methods | Description |
---|---|
GetRemoteMmiv2Configurations |
Get the supported remote MMIs for the device. |
IsRemoteMmiv2InFocus |
Gets the status of the remote MMI focus. |
GetRemoteMmiv2Focus |
Gets the focus of the Remote MMI specified. |
ReleaseRemoteMmiv2Focus |
Releases the focus of the Remote MMI specified. |
SetRemoteMmiv2Action |
Sets an output action on the Remote MMI. |
Device logging events
Some devices are able to send a variety of events happening in the headset to the computer. Events can be for example button presses or call control events.
In order to log device events, a listener function that will handle the data must be created.
Step 1: Prepare the listener function
Print the data on a terminal:
cs
private void DeviceLoggingInputListener(object sender, DeviceLoggingEventArgs e)
{
Console.WriteLine("DeviceLoggingInput from device {0}: {1}", e.DeviceId, e.Data);
}
Step 2: Setup Device Logging
Add the listener function from the previous step to the IDeviceService:
cs
ServiceFactory serviceFactory = new ServiceFactory();
serviceFactory.SetClientId(""); // Initialize with your Partner Key from developer.jabra.com
IDeviceService deviceService = serviceFactory.CreateDeviceService();
deviceService.DeviceAdded += DeviceAttachedListener; // Subscribing to device attached
deviceService.DeviceLoggingInput += DeviceLoggingInputListener; // Subscribing to device logging events
Step 3: Enable Device Logging
To receive events for a device, device logging must be enabled.
Enable device logging like this:
private void DeviceAttachedListener(object sender, DeviceAddedEventArgs e)
{
bool enabled = e.Device.IsDeviceLogEnabled; // Checking status
if (enabled == false)
e.Device.DeviceLoggingConfiguration(true); // Enabling
}
Now you can receive DeviceLogging events.
Data Format for Device Logs
The device logging data is formatted as a JSON string with varying fields depending on the event.
Some of those fields are:
Field | Description |
---|---|
"AppID":"aString" |
Your Jabra Partner Key. |
"Device Name":"Jabra Engage 50" |
The name of the device logging this event. |
"ESN":"00000000" |
The electronic serial number of the device logging this event. |
"FW":"1.0.0" |
The firmware version of the device logging the event. |
"ID":"VOLUP TAP" |
The ID of the button event (button + action). - Button IDs are for example VOLUP , VOLDOWN , MUTE , MFB , 3_DOT , 4_DOT - Actions are for example UP , DOWN , TAP , DOUBLE_TAP , PRESS , LONG_PRESS
|
"LocalTimeStamp":"20-03-2020 08:31:31" |
Timestamp of the event |
"Pid":"4002" |
The Product ID. |
"Raw data":"0x05 0x00 0x01 0x04" |
Raw event data. |
"Seq.No":1 |
Event ordinal number (increases by 1 with every logged event). |
"Variant":"01-4E" |
The device variant. |
"Mute State":"TRUE" |
Whether the device is muted or not. |
DECT Density events
Some devices support DECT density events. You can register a listener for them in a similar manner to the device logging events.
Step 1: Prepare the listener function
Create a listener function like this:
private void DectInformationInputListener(object sender, DectInformationEventArgs e)
{
string dectInfoRawDataStr = string.Join(" ", Array.ConvertAll(e.DectInformation.RawData, Convert.ToUInt32));
// do something with dectInfoRawDataStr...
}
Step 2: Setup the DECT events
Add the listener to IDeviceService:
ServiceFactory serviceFactory = new ServiceFactory();
serviceFactory.SetClientId(""); // Initialize with your Partner Key from developer.jabra.com
IDeviceService deviceService = serviceFactory.CreateDeviceService();
deviceService.DeviceAdded += DeviceAttachedListener; // Subscribing to device attached
deviceService.DectInformationInput += DectInformationInputListener; // Subscribing to DECT density events
Step 3: Enable DECT density logging
To receive events for a device, DECT density logging must be enabled.
Enable DECT density logging like this:
private void DeviceAttachedListener(object sender, DeviceAddedEventArgs e)
{
bool enabled = e.Device.IsDeviceLogEnabled; // Checking status
if (enabled == false)
e.Device.DeviceLoggingConfiguration(true); // Enabling
}
Now you have subscribed to DECT density events.
Firmware Update
There are several methods for Firmware Update functionality.
These methods are:
Methods | Description |
---|---|
IsFirmwareAvailableForUpdate |
Check's if firmware update is available for target device. |
GetLatestFirmware |
Get the details of latest firmware available for the target device from cloud. |
DownloadFirmware |
Download the selected version firmware for target device from cloud. |
CancelUpdate |
Cancel the download of the selected firmware for the target device. |
GetFirmwareFilePath |
Get the downloaded firmware local file path for the target device. |
UpdateDevice |
Update the selected firmware for the target device. |
DownloadFirmwareUpdater |
Download the latest firmware updater from cloud. |
GetAllFirmwares |
Get the details of all firmwares available for the target device from cloud. |