BluetoothGatt.WriteDescriptor 方法
定义
重要
一些信息与预发行产品相关,相应产品在发行之前可能会进行重大修改。 对于此处提供的信息,Microsoft 不作任何明示或暗示的担保。
重载
| 名称 | 说明 |
|---|---|
| WriteDescriptor(BluetoothGattDescriptor) |
将给定描述符的值写入关联的远程设备。 |
| WriteDescriptor(BluetoothGattDescriptor, Byte[]) |
将给定描述符的值写入关联的远程设备。 |
WriteDescriptor(BluetoothGattDescriptor)
将给定描述符的值写入关联的远程设备。
[Android.Runtime.Register("writeDescriptor", "(Landroid/bluetooth/BluetoothGattDescriptor;)Z", "")]
[Android.Runtime.RequiresPermission("android.permission.BLUETOOTH_CONNECT")]
public bool WriteDescriptor(Android.Bluetooth.BluetoothGattDescriptor? descriptor);
[<Android.Runtime.Register("writeDescriptor", "(Landroid/bluetooth/BluetoothGattDescriptor;)Z", "")>]
[<Android.Runtime.RequiresPermission("android.permission.BLUETOOTH_CONNECT")>]
member this.WriteDescriptor : Android.Bluetooth.BluetoothGattDescriptor -> bool
参数
- descriptor
- BluetoothGattDescriptor
写入关联远程设备的描述符
返回
如果成功启动写入操作,则为 true
- 特性
注解
将给定描述符的值写入关联的远程设备。
BluetoothGattCallback#onDescriptorWrite触发回调以报告写入操作的结果。
此成员已弃用。
BluetoothGatt#writeDescriptor(BluetoothGattDescriptor, byte[])由于它依赖于BluetoothGattDescriptor基础字段在此方法外部发生更改的对象,因此它不能安全使用内存。
Java文档android.bluetooth.BluetoothGatt.writeDescriptor(android.bluetooth.BluetoothGattDescriptor)。
本页的某些部分是根据 创建和共享的工作进行的修改,并根据 许可证中所述的条款使用。
适用于
WriteDescriptor(BluetoothGattDescriptor, Byte[])
将给定描述符的值写入关联的远程设备。
[Android.Runtime.Register("writeDescriptor", "(Landroid/bluetooth/BluetoothGattDescriptor;[B)I", "", ApiSince=33)]
[Android.Runtime.RequiresPermission("android.permission.BLUETOOTH_CONNECT")]
public int WriteDescriptor(Android.Bluetooth.BluetoothGattDescriptor descriptor, byte[] value);
[<Android.Runtime.Register("writeDescriptor", "(Landroid/bluetooth/BluetoothGattDescriptor;[B)I", "", ApiSince=33)>]
[<Android.Runtime.RequiresPermission("android.permission.BLUETOOTH_CONNECT")>]
member this.WriteDescriptor : Android.Bluetooth.BluetoothGattDescriptor * byte[] -> int
参数
- descriptor
- BluetoothGattDescriptor
写入关联远程设备的描述符
- value
- Byte[]
返回
如果成功启动写入操作,则为 true
- 特性
注解
将给定描述符的值写入关联的远程设备。
BluetoothGattCallback#onDescriptorWrite触发回调以报告写入操作的结果。
本页的某些部分是根据 创建和共享的工作进行的修改,并根据 许可证中所述的条款使用。