语言

BluetoothGattCallback.OnCharacteristicRead 方法

定义

重载

OnCharacteristicRead(BluetoothGatt, BluetoothGattCharacteristic, GattStatus)

回调报告特征读取操作的结果。

[Android.Runtime.Register("onCharacteristicRead", "(Landroid/bluetooth/BluetoothGatt;Landroid/bluetooth/BluetoothGattCharacteristic;I)V", "GetOnCharacteristicRead_Landroid_bluetooth_BluetoothGatt_Landroid_bluetooth_BluetoothGattCharacteristic_IHandler")]
public virtual void OnCharacteristicRead(Android.Bluetooth.BluetoothGatt? gatt, Android.Bluetooth.BluetoothGattCharacteristic? characteristic, Android.Bluetooth.GattStatus status);
[<Android.Runtime.Register("onCharacteristicRead", "(Landroid/bluetooth/BluetoothGatt;Landroid/bluetooth/BluetoothGattCharacteristic;I)V", "GetOnCharacteristicRead_Landroid_bluetooth_BluetoothGatt_Landroid_bluetooth_BluetoothGattCharacteristic_IHandler")>]
abstract member OnCharacteristicRead : Android.Bluetooth.BluetoothGatt * Android.Bluetooth.BluetoothGattCharacteristic * Android.Bluetooth.GattStatus -> unit
override this.OnCharacteristicRead : Android.Bluetooth.BluetoothGatt * Android.Bluetooth.BluetoothGattCharacteristic * Android.Bluetooth.GattStatus -> unit

参数

gatt
BluetoothGatt

调用 GATT 客户端 BluetoothGatt#readCharacteristic(BluetoothGattCharacteristic)

characteristic
BluetoothGattCharacteristic

从关联的远程设备读取的特征。

status
GattStatus

BluetoothGatt#GATT_SUCCESS 如果读取操作成功完成,则为 。

特性

注解

回调报告特征读取操作的结果。

此成员已弃用。 在内存安全时使用BluetoothGattCallback#onCharacteristicRead(BluetoothGatt, BluetoothGattCharacteristic, byte[], int)

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

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

适用于

OnCharacteristicRead(BluetoothGatt, BluetoothGattCharacteristic, Byte[], GattStatus)

回调报告特征读取操作的结果。

[Android.Runtime.Register("onCharacteristicRead", "(Landroid/bluetooth/BluetoothGatt;Landroid/bluetooth/BluetoothGattCharacteristic;[BI)V", "GetOnCharacteristicRead_Landroid_bluetooth_BluetoothGatt_Landroid_bluetooth_BluetoothGattCharacteristic_arrayBIHandler", ApiSince=33)]
public virtual void OnCharacteristicRead(Android.Bluetooth.BluetoothGatt gatt, Android.Bluetooth.BluetoothGattCharacteristic characteristic, byte[] value, Android.Bluetooth.GattStatus status);
[<Android.Runtime.Register("onCharacteristicRead", "(Landroid/bluetooth/BluetoothGatt;Landroid/bluetooth/BluetoothGattCharacteristic;[BI)V", "GetOnCharacteristicRead_Landroid_bluetooth_BluetoothGatt_Landroid_bluetooth_BluetoothGattCharacteristic_arrayBIHandler", ApiSince=33)>]
abstract member OnCharacteristicRead : Android.Bluetooth.BluetoothGatt * Android.Bluetooth.BluetoothGattCharacteristic * byte[] * Android.Bluetooth.GattStatus -> unit
override this.OnCharacteristicRead : Android.Bluetooth.BluetoothGatt * Android.Bluetooth.BluetoothGattCharacteristic * byte[] * Android.Bluetooth.GattStatus -> unit

参数

gatt
BluetoothGatt

调用 GATT 客户端 BluetoothGatt#readCharacteristic(BluetoothGattCharacteristic)

characteristic
BluetoothGattCharacteristic

从关联的远程设备读取的特征。

value
Byte[]

特征的值

status
GattStatus

BluetoothGatt#GATT_SUCCESS 如果读取操作成功完成,则为 。

特性

注解

回调报告特征读取操作的结果。

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

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

适用于