BluetoothGattConnectionSettings


public final class BluetoothGattConnectionSettings
extends Object

java.lang.Object
   ↳ android.bluetooth.BluetoothGattConnectionSettings


Defines parameters for creating BluetoothGatt connection.

Used with BluetoothDevice.connectGatt to create a Gatt client connection.

BluetoothDevice.connectGatt ensures It applies the Gatt settings passed as part of BluetoothGattConnectionSettings

Summary

Nested classes

class BluetoothGattConnectionSettings.Builder

Builder for BluetoothGattConnectionSettings

Public methods

int getTransport()

Returns the transport to be used for GATT connection.

boolean isAutoConnectEnabled()

Returns true if auto connection enabled or false otherwise.

boolean isAutomaticMtuEnabled()

Returns true if the automatic MTU exchange is enabled for this connection or false otherwise.

boolean isOpportunisticEnabled()

Returns if the GATT connection is opportunistic or not.

String toString()

Returns a String that describes each BluetoothGattConnectionSettings parameter current value.

Inherited methods

Public methods

getTransport

public int getTransport ()

Returns the transport to be used for GATT connection.

Returns
int Value is one of the following:

isAutoConnectEnabled

public boolean isAutoConnectEnabled ()

Returns true if auto connection enabled or false otherwise.

Returns
boolean

isAutomaticMtuEnabled

public boolean isAutomaticMtuEnabled ()

Returns true if the automatic MTU exchange is enabled for this connection or false otherwise.

Returns
boolean

isOpportunisticEnabled

public boolean isOpportunisticEnabled ()

Returns if the GATT connection is opportunistic or not.

Returns
boolean

toString

public String toString ()

Returns a String that describes each BluetoothGattConnectionSettings parameter current value.

Returns
String a string representation of the object.