Language

BluetoothGattConnectionSettings.Builder.SetAutomaticMtuEnabled Method

Definition

Sets if the MTU (Maximum Transmission Unit) needs to be negotiated for given connection or not.

[Android.Runtime.Register("setAutomaticMtuEnabled", "(Z)Landroid/bluetooth/BluetoothGattConnectionSettings$Builder;", "", ApiSince=37)]
public Android.Bluetooth.BluetoothGattConnectionSettings.Builder SetAutomaticMtuEnabled(bool automaticMtuEnabled);
[<Android.Runtime.Register("setAutomaticMtuEnabled", "(Z)Landroid/bluetooth/BluetoothGattConnectionSettings$Builder;", "", ApiSince=37)>]
member this.SetAutomaticMtuEnabled : bool -> Android.Bluetooth.BluetoothGattConnectionSettings.Builder

Parameters

automaticMtuEnabled
Boolean

true if Default MTU setting needs to be applied on this connection, false otherwise.

Returns

This builder. This value cannot be null.

Attributes

Remarks

Sets if the MTU (Maximum Transmission Unit) needs to be negotiated for given connection or not. This is set to true by default so that MTU exchange happens after the connection. Applications have to set it to false to disable the automatic negotiation. Setting this to false does not prevent MTU negotiation if a client explicitly requests it using BluetoothGatt.requestMtu or if it's triggered internally by other profiles.

Android reference for android.bluetooth.BluetoothGattConnectionSettings.Builder.setAutomaticMtuEnabled.

Portions of this page are modifications based on work created and shared by the Android Open Source Project and used according to terms described in the Creative Commons 2.5 Attribution License.

Applies to