BluetoothGatt.WriteDescriptor 方法
定義
重要
部分資訊涉及發行前產品,在發行之前可能會有大幅修改。 Microsoft 對此處提供的資訊,不做任何明確或隱含的瑕疵擔保。
多載
| 名稱 | Description |
|---|---|
| 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)。
本頁部分內容為基於 Open Source Project 所創建與分享的作品,並依授權條款所描述的使用進行修改。
適用於
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 調以回報寫入操作的結果。
本頁部分內容為基於 Open Source Project 所創建與分享的作品,並依授權條款所描述的使用進行修改。