Language

BluetoothGattServer.SendResponse メソッド

定義

オーバーロード

Name 説明
SendResponse(BluetoothDevice, Int32, GattStatus, Int32, Byte[])

GATT の読み取りまたは書き込み応答をリモート クライアントに送信します。

SendResponse(BluetoothDevice, Int32, ProfileState, Int32, Byte[])

リモート デバイスに読み取りまたは書き込み要求に応答を送信します。

SendResponse(BluetoothDevice, Int32, GattStatus, Int32, Byte[])

GATT の読み取りまたは書き込み応答をリモート クライアントに送信します。

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

応答を受信するリモート GATT クライアント。

requestId
Int32

対応する読み取りまたは書き込みコールバックで受信した要求識別子。

status
GattStatus

要求に送信する GATT 状態コード。

offset
Int32

部分的な読み取りまたは書き込み応答に使用される値オフセット。

value
Byte[]

応答に含まれる属性バイト。値が指定されていない場合は null 。

戻り値

true 応答が Bluetooth サービスに送信された場合。それ以外の場合は false。

注釈

このページの一部は、によって作成および共有され、に記載されている条件に従って使用される作業に基づく変更です。

適用対象

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

コールバックで受信された要求の ID

status
ProfileState

リモート デバイスに送信される要求の状態

offset
Int32

部分的な読み取り/書き込み応答の値オフセット

value
Byte[]

読み取り/書き込まれた属性の値 (省略可能)

戻り値

true 応答が Bluetooth サービスに送信された場合。それ以外の場合は false。

属性

注釈

リモート デバイスに読み取りまたは書き込み要求に応答を送信します。

リモートの読み取り/書き込み要求が次のいずれかのコールバック メソッドによって受信されたときに、この関数を呼び出す必要があります。

  • BluetoothGattServerCallback#onCharacteristicReadRequest
  • BluetoothGattServerCallback#onCharacteristicWriteRequest
  • BluetoothGattServerCallback#onDescriptorReadRequest
  • BluetoothGattServerCallback#onDescriptorWriteRequest

Javaドキュメント。

このページの一部は、によって作成および共有され、に記載されている条件に従って使用される作業に基づく変更です。

適用対象