BluetoothGattCallback.OnCharacteristicChanged 方法
定义
重要
一些信息与预发行产品相关,相应产品在发行之前可能会进行重大修改。 对于此处提供的信息,Microsoft 不作任何明示或暗示的担保。
重载
| 名称 | 说明 |
|---|---|
| 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[]) 通知时提供特征值,将其用作内存安全。
本页的某些部分是根据 创建和共享的工作进行的修改,并根据 许可证中所述的条款使用。
适用于
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[]
通知特征值
- 特性
注解
由于远程特征通知而触发的回调。 请注意,由于收到远程特征通知,特征对象中的值可能已更改,因此请在通知时检查该值的参数值。
本页的某些部分是根据 创建和共享的工作进行的修改,并根据 许可证中所述的条款使用。