BluetoothGatt.WriteDescriptor Method
Definition
Important
Some information relates to prerelease product that may be substantially modified before it’s released. Microsoft makes no warranties, express or implied, with respect to the information provided here.
Overloads
WriteDescriptor(BluetoothGattDescriptor) |
Write the value of a given descriptor to the associated remote device. |
WriteDescriptor(BluetoothGattDescriptor, Byte[]) |
Write the value of a given descriptor to the associated remote device. |
WriteDescriptor(BluetoothGattDescriptor)
Write the value of a given descriptor to the associated remote device.
[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
Parameters
- descriptor
- BluetoothGattDescriptor
Descriptor to write to the associated remote device
Returns
true, if the write operation was initiated successfully
- Attributes
Remarks
Write the value of a given descriptor to the associated remote device.
A BluetoothGattCallback#onDescriptorWrite
callback is triggered to report the result of the write operation.
This member is deprecated. Use BluetoothGatt#writeDescriptor(BluetoothGattDescriptor, byte[])
as this is not memory safe because it relies on a BluetoothGattDescriptor
object whose underlying fields are subject to change outside this method.
Portions of this page are modifications based on work created and shared by the Android Open Source Project and used according to terms described in the Creative Commons 2.5 Attribution License.
Applies to
WriteDescriptor(BluetoothGattDescriptor, Byte[])
Write the value of a given descriptor to the associated remote device.
[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
Parameters
- descriptor
- BluetoothGattDescriptor
Descriptor to write to the associated remote device
- value
- Byte[]
Returns
true, if the write operation was initiated successfully
- Attributes
Remarks
Write the value of a given descriptor to the associated remote device.
A BluetoothGattCallback#onDescriptorWrite
callback is triggered to report the result of the write operation.
Portions of this page are modifications based on work created and shared by the Android Open Source Project and used according to terms described in the Creative Commons 2.5 Attribution License.