BluetoothGatt.WriteCharacteristic メソッド
定義
重要
一部の情報は、リリース前に大きく変更される可能性があるプレリリースされた製品に関するものです。 Microsoft は、ここに記載されている情報について、明示または黙示を問わず、一切保証しません。
オーバーロード
| 名前 | 説明 |
|---|---|
| WriteCharacteristic(BluetoothGattCharacteristic) |
特定の特性とその値を、関連付けられているリモート デバイスに書き込みます。 |
| WriteCharacteristic(BluetoothGattCharacteristic, Byte[], Int32) |
特定の特性とその値を、関連付けられているリモート デバイスに書き込みます。 |
WriteCharacteristic(BluetoothGattCharacteristic)
特定の特性とその値を、関連付けられているリモート デバイスに書き込みます。
[Android.Runtime.Register("writeCharacteristic", "(Landroid/bluetooth/BluetoothGattCharacteristic;)Z", "")]
[Android.Runtime.RequiresPermission("android.permission.BLUETOOTH_CONNECT")]
public bool WriteCharacteristic(Android.Bluetooth.BluetoothGattCharacteristic? characteristic);
[<Android.Runtime.Register("writeCharacteristic", "(Landroid/bluetooth/BluetoothGattCharacteristic;)Z", "")>]
[<Android.Runtime.RequiresPermission("android.permission.BLUETOOTH_CONNECT")>]
member this.WriteCharacteristic : Android.Bluetooth.BluetoothGattCharacteristic -> bool
パラメーター
- characteristic
- BluetoothGattCharacteristic
リモート デバイスに書き込む特性
返品
書き込み操作が正常に開始された場合は true
- 属性
注釈
特定の特性とその値を、関連付けられているリモート デバイスに書き込みます。
書き込み操作が完了すると、 BluetoothGattCallback#onCharacteristicWrite コールバックが呼び出され、操作の結果が報告されます。
このメンバーは非推奨です。 基になるフィールドがこのメソッドの外部で変更される可能性があるBluetoothGattCharacteristic オブジェクトに依存するため、BluetoothGatt#writeCharacteristic(BluetoothGattCharacteristic, byte[], int)はメモリセーフではないため、使用してください。
このページの一部は、によって作成および共有され、に記載されている条件に従って使用される作業に基づく変更です。
適用対象
WriteCharacteristic(BluetoothGattCharacteristic, Byte[], Int32)
特定の特性とその値を、関連付けられているリモート デバイスに書き込みます。
[Android.Runtime.Register("writeCharacteristic", "(Landroid/bluetooth/BluetoothGattCharacteristic;[BI)I", "", ApiSince=33)]
[Android.Runtime.RequiresPermission("android.permission.BLUETOOTH_CONNECT")]
public int WriteCharacteristic(Android.Bluetooth.BluetoothGattCharacteristic characteristic, byte[] value, int writeType);
[<Android.Runtime.Register("writeCharacteristic", "(Landroid/bluetooth/BluetoothGattCharacteristic;[BI)I", "", ApiSince=33)>]
[<Android.Runtime.RequiresPermission("android.permission.BLUETOOTH_CONNECT")>]
member this.WriteCharacteristic : Android.Bluetooth.BluetoothGattCharacteristic * byte[] * int -> int
パラメーター
- characteristic
- BluetoothGattCharacteristic
リモート デバイスに書き込む特性
- value
- Byte[]
- writeType
- Int32
返品
特性が正常に書き込まれたかどうか
- 属性
注釈
特定の特性とその値を、関連付けられているリモート デバイスに書き込みます。
書き込み操作が完了すると、 BluetoothGattCallback#onCharacteristicWrite コールバックが呼び出され、操作の結果が報告されます。
このページの一部は、によって作成および共有され、に記載されている条件に従って使用される作業に基づく変更です。