语言

BluetoothGattCallback.OnMtuChanged(BluetoothGatt, Int32, GattStatus) 方法

定义

指示给定设备连接的 MTU 已更改的回调。

[Android.Runtime.Register("onMtuChanged", "(Landroid/bluetooth/BluetoothGatt;II)V", "GetOnMtuChanged_Landroid_bluetooth_BluetoothGatt_IIHandler")]
public virtual void OnMtuChanged(Android.Bluetooth.BluetoothGatt? gatt, int mtu, Android.Bluetooth.GattStatus status);
[<Android.Runtime.Register("onMtuChanged", "(Landroid/bluetooth/BluetoothGatt;II)V", "GetOnMtuChanged_Landroid_bluetooth_BluetoothGatt_IIHandler")>]
abstract member OnMtuChanged : Android.Bluetooth.BluetoothGatt * int * Android.Bluetooth.GattStatus -> unit
override this.OnMtuChanged : Android.Bluetooth.BluetoothGatt * int * Android.Bluetooth.GattStatus -> unit

参数

gatt
BluetoothGatt

调用 GATT 客户端 BluetoothGatt#requestMtu

mtu
Int32

新的 MTU 大小

status
GattStatus

BluetoothGatt#GATT_SUCCESS 如果 MTU 已成功更改,则为

特性

注解

指示给定设备连接的 MTU 已更改的回调。

此回调是在响应 BluetoothGatt#requestMtu 函数或响应连接事件时触发的。

Java文档android.bluetooth.BluetoothGattCallback.onMtuChanged(android.bluetooth.BluetoothGatt, int, int)。

本页的某些部分是根据 创建和共享的工作进行的修改,并根据 许可证中所述的条款使用。

适用于