语言

BluetoothGatt.ReadCharacteristic(BluetoothGattCharacteristic) 方法

定义

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

[Android.Runtime.Register("readCharacteristic", "(Landroid/bluetooth/BluetoothGattCharacteristic;)Z", "")]
[Android.Runtime.RequiresPermission("android.permission.BLUETOOTH_CONNECT")]
public bool ReadCharacteristic(Android.Bluetooth.BluetoothGattCharacteristic? characteristic);
[<Android.Runtime.Register("readCharacteristic", "(Landroid/bluetooth/BluetoothGattCharacteristic;)Z", "")>]
[<Android.Runtime.RequiresPermission("android.permission.BLUETOOTH_CONNECT")>]
member this.ReadCharacteristic : Android.Bluetooth.BluetoothGattCharacteristic -> bool

参数

characteristic
BluetoothGattCharacteristic

从远程设备读取的特征

返回

如果成功启动读取操作,则为 true

特性

注解

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

这是异步操作。 读取操作的结果由 BluetoothGattCallback#onCharacteristicRead(BluetoothGatt, BluetoothGattCharacteristic, byte[], int) 回调报告。

Java文档android.bluetooth.BluetoothGatt.readCharacteristic(android.bluetooth.BluetoothGattCharacteristic)。

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

适用于