Class AndroidBluetoothClientGattCallback
Android BLE GATT client callback. Makes requests to servers to read a characteristic upon encountering a service.
Inheritance
System.Object
AndroidBluetoothClientGattCallback
Assembly: SensusAndroid.dll
Syntax
public class AndroidBluetoothClientGattCallback : BluetoothGattCallback
Constructors
AndroidBluetoothClientGattCallback(BluetoothGattService, BluetoothGattCharacteristic)
Declaration
public AndroidBluetoothClientGattCallback(BluetoothGattService service, BluetoothGattCharacteristic characteristic)
Parameters
Type |
Name |
Description |
Android.Bluetooth.BluetoothGattService |
service |
|
Android.Bluetooth.BluetoothGattCharacteristic |
characteristic |
|
Methods
DisconnectPeripheral()
Declaration
public void DisconnectPeripheral()
OnCharacteristicRead(BluetoothGatt, BluetoothGattCharacteristic, GattStatus)
Declaration
public override void OnCharacteristicRead(BluetoothGatt peripheral, BluetoothGattCharacteristic characteristic, GattStatus status)
Parameters
Type |
Name |
Description |
Android.Bluetooth.BluetoothGatt |
peripheral |
|
Android.Bluetooth.BluetoothGattCharacteristic |
characteristic |
|
Android.Bluetooth.GattStatus |
status |
|
OnConnectionStateChange(BluetoothGatt, GattStatus, ProfileState)
Declaration
public override void OnConnectionStateChange(BluetoothGatt peripheral, GattStatus status, ProfileState newState)
Parameters
Type |
Name |
Description |
Android.Bluetooth.BluetoothGatt |
peripheral |
|
Android.Bluetooth.GattStatus |
status |
|
Android.Bluetooth.ProfileState |
newState |
|
OnServicesDiscovered(BluetoothGatt, GattStatus)
Declaration
public override void OnServicesDiscovered(BluetoothGatt peripheral, GattStatus status)
Parameters
Type |
Name |
Description |
Android.Bluetooth.BluetoothGatt |
peripheral |
|
Android.Bluetooth.GattStatus |
status |
|
ReadCharacteristicValueAsync(CancellationToken)
Declaration
public Task<string> ReadCharacteristicValueAsync(CancellationToken cancellationToken)
Parameters
Type |
Name |
Description |
System.Threading.CancellationToken |
cancellationToken |
|
Returns
Type |
Description |
System.Threading.Tasks.Task<System.String> |
|