BluetoothGattCallback.OnCharacteristicWrite 方法
定義
重要
部分資訊涉及發行前產品,在發行之前可能會有大幅修改。 Microsoft 對此處提供的資訊,不做任何明確或隱含的瑕疵擔保。
回調表示特徵寫入操作的結果。
[Android.Runtime.Register("onCharacteristicWrite", "(Landroid/bluetooth/BluetoothGatt;Landroid/bluetooth/BluetoothGattCharacteristic;I)V", "GetOnCharacteristicWrite_Landroid_bluetooth_BluetoothGatt_Landroid_bluetooth_BluetoothGattCharacteristic_IHandler")]
public virtual void OnCharacteristicWrite(Android.Bluetooth.BluetoothGatt? gatt, Android.Bluetooth.BluetoothGattCharacteristic? characteristic, Android.Bluetooth.GattStatus status);
[<Android.Runtime.Register("onCharacteristicWrite", "(Landroid/bluetooth/BluetoothGatt;Landroid/bluetooth/BluetoothGattCharacteristic;I)V", "GetOnCharacteristicWrite_Landroid_bluetooth_BluetoothGatt_Landroid_bluetooth_BluetoothGattCharacteristic_IHandler")>]
abstract member OnCharacteristicWrite : Android.Bluetooth.BluetoothGatt * Android.Bluetooth.BluetoothGattCharacteristic * Android.Bluetooth.GattStatus -> unit
override this.OnCharacteristicWrite : Android.Bluetooth.BluetoothGatt * Android.Bluetooth.BluetoothGattCharacteristic * Android.Bluetooth.GattStatus -> unit
參數
- gatt
- BluetoothGatt
GATT 客戶端呼叫 BluetoothGatt#writeCharacteristic(BluetoothGattCharacteristic, byte[], int)
- characteristic
- BluetoothGattCharacteristic
寫入到相關遠端裝置的特徵。
- status
- GattStatus
如果操作成功,則是寫入操作 BluetoothGatt#GATT_SUCCESS 的結果。
- 屬性
備註
回調表示特徵寫入操作的結果。
若在可靠寫入交易進行時呼叫此特徵值代表遠端裝置回報的值。 應用程式應將此值與期望撰寫的值進行比較。 若值不匹配,應用程式必須中止可靠的寫入交易。
本頁部分內容為基於 Open Source Project 所創建與分享的作品,並依授權條款所描述的使用進行修改。