Interface IBluetoothDongle
- Namespace
- Jabra.NET.Sdk.DevicePairing
- Assembly
- Jabra.NET.Sdk.DevicePairing.dll
public interface IBluetoothDongle
- Extension Methods
Properties
Name
string Name { get; }
Property Value
Methods
ConnectTo(IBluetoothAddress, TimeSpan)
Connect to a device that is already paired with the dongle.
Task<IBluetoothChildDevice> ConnectTo(IBluetoothAddress bluetoothAddress, TimeSpan timeout)
Parameters
bluetoothAddress
IBluetoothAddresstimeout
TimeSpan
Returns
- Task<IBluetoothChildDevice>
An IBluetoothChildDevice with information about the connected device
Remarks
When a device is connected successfully, it may not be detected by the SDK. This will happen for 3rd party devices connected to the dongle, and certain Jabra devices that have limited communication capabilities when connected over Bluetooth.
Exceptions
- TimeoutException
When the connection could not be established within the allotted time span.
- DeviceNotPairedException
When the specified address is not currently paired with the dongle
- SdkUsageException
DisconnectFrom(IBluetoothAddress, TimeSpan)
Disconnect from a device with the specified Bluetooth address.
Task DisconnectFrom(IBluetoothAddress bluetoothAddress, TimeSpan timeout)
Parameters
bluetoothAddress
IBluetoothAddresstimeout
TimeSpan
Returns
Exceptions
- TimeoutException
When the disconnect was not reported within the allotted time span.
GetConnectedDevice()
Get information about the device currently connected to the dongle.
Task<IBluetoothChildDevice?> GetConnectedDevice()
Returns
GetPairingList()
Get the list of devices paired with the dongle.
Task<IReadOnlyList<IPairingListEntry>> GetPairingList()
Returns
IsAutoSearchAndConnectEnabled()
Task<bool> IsAutoSearchAndConnectEnabled()
Returns
IsConnectedTo(IBluetoothAddress)
Task<bool> IsConnectedTo(IBluetoothAddress bluetoothAddress)
Parameters
bluetoothAddress
IBluetoothAddress
Returns
IsPairedWith(IBluetoothAddress)
Check if the dongle is paired with a device with the specified Bluetooth address.
Task<bool> IsPairedWith(IBluetoothAddress bluetoothAddress)
Parameters
bluetoothAddress
IBluetoothAddress
Returns
PairAndConnectTo(IBluetoothAddress, TimeSpan)
Pair with and connect to another Bluetooth device.
Task<IBluetoothChildDevice> PairAndConnectTo(IBluetoothAddress bluetoothAddress, TimeSpan timeout)
Parameters
bluetoothAddress
IBluetoothAddressThe Bluetooth address of the other device.
timeout
TimeSpanThe maximum amount of time to wait for the pairing and connection process to complete.
Returns
- Task<IBluetoothChildDevice>
An IBluetoothChildDevice with information about the connected device
Exceptions
- TimeoutException
When the other device doesn't pair and connect within the allotted time span.
- See Also
ScanForDevicesInPairingMode(TimeSpan)
Start scanning for devices in pairing mode.
IObservable<IScanEntry> ScanForDevicesInPairingMode(TimeSpan duration)
Parameters
duration
TimeSpanThe duration to keep scanning.
Returns
- IObservable<IScanEntry>
An observable that emits when new devices are found.
SetAutoSearchAndConnectEnabled(bool)
Task SetAutoSearchAndConnectEnabled(bool enable)
Parameters
enable
bool
Returns
StopDeviceScanning()
Stop scanning for devices in pairing mode.
Task StopDeviceScanning()
Returns
- Task
A task that completes when the scanning has stopped.
Unpair(IBluetoothAddress)
Remove the pairing to the device with the specified Bluetooth address.
Task Unpair(IBluetoothAddress bluetoothAddress)
Parameters
bluetoothAddress
IBluetoothAddress
Returns
Exceptions
- DeviceNotPairedException
When the specified address is not currently paired with the dongle
- UnpairConnectedDeviceException
When the specified device is currently connected to the dongle, it cannot be unpaired.