BluetoothGatt.ReadCharacteristic(BluetoothGattCharacteristic) 方法
定义
重要
一些信息与预发行产品相关,相应产品在发行之前可能会进行重大修改。 对于此处提供的信息,Microsoft 不作任何明示或暗示的担保。
从关联的远程设备读取请求的特征。
[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) 回调报告。
本页的某些部分是根据 创建和共享的工作进行的修改,并根据 许可证中所述的条款使用。