BluetoothGattServer.SendResponse 方法
定義
重要
部分資訊涉及發行前產品,在發行之前可能會有大幅修改。 Microsoft 對此處提供的資訊,不做任何明確或隱含的瑕疵擔保。
多載
| 名稱 | Description |
|---|---|
| SendResponse(BluetoothDevice, Int32, GattStatus, Int32, Byte[]) | |
| SendResponse(BluetoothDevice, Int32, ProfileState, Int32, Byte[]) |
對遠端裝置的讀寫請求發送回應。 |
SendResponse(BluetoothDevice, Int32, GattStatus, Int32, Byte[])
public bool SendResponse(Android.Bluetooth.BluetoothDevice device, int requestId, Android.Bluetooth.GattStatus status, int offset, byte[] value);
member this.SendResponse : Android.Bluetooth.BluetoothDevice * int * Android.Bluetooth.GattStatus * int * byte[] -> bool
參數
- device
- BluetoothDevice
- requestId
- Int32
- status
- GattStatus
- offset
- Int32
- value
- Byte[]
傳回
備註
本頁部分內容為基於 Open Source Project 所創建與分享的作品,並依授權條款所描述的使用進行修改。
適用於
SendResponse(BluetoothDevice, Int32, ProfileState, Int32, Byte[])
對遠端裝置的讀寫請求發送回應。
[Android.Runtime.Register("sendResponse", "(Landroid/bluetooth/BluetoothDevice;III[B)Z", "")]
[Android.Runtime.RequiresPermission("android.permission.BLUETOOTH_CONNECT")]
public bool SendResponse(Android.Bluetooth.BluetoothDevice device, int requestId, Android.Bluetooth.ProfileState status, int offset, byte[]? value);
[<Android.Runtime.Register("sendResponse", "(Landroid/bluetooth/BluetoothDevice;III[B)Z", "")>]
[<Android.Runtime.RequiresPermission("android.permission.BLUETOOTH_CONNECT")>]
member this.SendResponse : Android.Bluetooth.BluetoothDevice * int * Android.Bluetooth.ProfileState * int * byte[] -> bool
參數
- device
- BluetoothDevice
傳送此回應的遠端裝置
- requestId
- Int32
回覆時收到的請求編號
- status
- ProfileState
請求發送給遠端裝置的狀態
- offset
- Int32
部分讀寫響應的值偏移量
- value
- Byte[]
被讀寫屬性的值(可選)
傳回
- 屬性
備註
對遠端裝置的讀寫請求發送回應。
當以下其中一種回調方法接收遠端讀寫請求時,必須在中呼叫此函式:
<烏爾><利BluetoothGattServerCallback#onCharacteristicReadRequest<>利>BluetoothGattServerCallback#onDescriptorWriteRequest><<BluetoothGattServerCallback#onCharacteristicWriteRequest>BluetoothGattServerCallback#onDescriptorReadRequest</烏爾>
本頁部分內容為基於 Open Source Project 所創建與分享的作品,並依授權條款所描述的使用進行修改。