语言

BluetoothGattCallback.OnCharacteristicChanged 方法

定义

重载

名称 说明
OnCharacteristicChanged(BluetoothGatt, BluetoothGattCharacteristic)

由于远程特征通知而触发的回调。

OnCharacteristicChanged(BluetoothGatt, BluetoothGattCharacteristic, Byte[])

由于远程特征通知而触发的回调。

OnCharacteristicChanged(BluetoothGatt, BluetoothGattCharacteristic)

由于远程特征通知而触发的回调。

[Android.Runtime.Register("onCharacteristicChanged", "(Landroid/bluetooth/BluetoothGatt;Landroid/bluetooth/BluetoothGattCharacteristic;)V", "GetOnCharacteristicChanged_Landroid_bluetooth_BluetoothGatt_Landroid_bluetooth_BluetoothGattCharacteristic_Handler")]
public virtual void OnCharacteristicChanged(Android.Bluetooth.BluetoothGatt? gatt, Android.Bluetooth.BluetoothGattCharacteristic? characteristic);
[<Android.Runtime.Register("onCharacteristicChanged", "(Landroid/bluetooth/BluetoothGatt;Landroid/bluetooth/BluetoothGattCharacteristic;)V", "GetOnCharacteristicChanged_Landroid_bluetooth_BluetoothGatt_Landroid_bluetooth_BluetoothGattCharacteristic_Handler")>]
abstract member OnCharacteristicChanged : Android.Bluetooth.BluetoothGatt * Android.Bluetooth.BluetoothGattCharacteristic -> unit
override this.OnCharacteristicChanged : Android.Bluetooth.BluetoothGatt * Android.Bluetooth.BluetoothGattCharacteristic -> unit

参数

gatt
BluetoothGatt

特征与 GATT 客户端关联的 GATT 客户端

characteristic
BluetoothGattCharacteristic

由于远程通知事件而更新的特征。

特性

注解

由于远程特征通知而触发的回调。

此成员已弃用。 在 BluetoothGattCallback#onCharacteristicChanged(BluetoothGatt, BluetoothGattCharacteristic, byte[]) 通知时提供特征值,将其用作内存安全。

Java文档android.bluetooth.BluetoothGattCallback.onCharacteristicChanged(android.bluetooth.BluetoothGatt, android.bluetooth.BluetoothGattCharacteristic)。

本页的某些部分是根据 创建和共享的工作进行的修改,并根据 许可证中所述的条款使用。

适用于

OnCharacteristicChanged(BluetoothGatt, BluetoothGattCharacteristic, Byte[])

由于远程特征通知而触发的回调。

[Android.Runtime.Register("onCharacteristicChanged", "(Landroid/bluetooth/BluetoothGatt;Landroid/bluetooth/BluetoothGattCharacteristic;[B)V", "GetOnCharacteristicChanged_Landroid_bluetooth_BluetoothGatt_Landroid_bluetooth_BluetoothGattCharacteristic_arrayBHandler", ApiSince=33)]
public virtual void OnCharacteristicChanged(Android.Bluetooth.BluetoothGatt gatt, Android.Bluetooth.BluetoothGattCharacteristic characteristic, byte[] value);
[<Android.Runtime.Register("onCharacteristicChanged", "(Landroid/bluetooth/BluetoothGatt;Landroid/bluetooth/BluetoothGattCharacteristic;[B)V", "GetOnCharacteristicChanged_Landroid_bluetooth_BluetoothGatt_Landroid_bluetooth_BluetoothGattCharacteristic_arrayBHandler", ApiSince=33)>]
abstract member OnCharacteristicChanged : Android.Bluetooth.BluetoothGatt * Android.Bluetooth.BluetoothGattCharacteristic * byte[] -> unit
override this.OnCharacteristicChanged : Android.Bluetooth.BluetoothGatt * Android.Bluetooth.BluetoothGattCharacteristic * byte[] -> unit

参数

gatt
BluetoothGatt

特征与 GATT 客户端关联的 GATT 客户端

characteristic
BluetoothGattCharacteristic

由于远程通知事件而更新的特征。

value
Byte[]

通知特征值

特性

注解

由于远程特征通知而触发的回调。 请注意,由于收到远程特征通知,特征对象中的值可能已更改,因此请在通知时检查该值的参数值。

Java文档android.bluetooth.BluetoothGattCallback.onCharacteristicChanged(android.bluetooth.BluetoothGatt, android.bluetooth.BluetoothGattCharacteristic, byte[])。

本页的某些部分是根据 创建和共享的工作进行的修改,并根据 许可证中所述的条款使用。

适用于