BluetoothGattConnectionSettings


class BluetoothGattConnectionSettings
kotlin.Any
   ↳ android.bluetooth.BluetoothGattConnectionSettings

Defines parameters for creating BluetoothGatt connection.

Used with android.bluetooth.BluetoothDevice#connectGatt to create a Gatt client connection.

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

Summary

Nested classes

Builder for BluetoothGattConnectionSettings.

Public methods
Int

Returns the transport to be used for GATT connection.

Boolean

Returns true if auto connection enabled or false otherwise.

Boolean

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

Boolean

Returns if the GATT connection is opportunistic or not.

String

Returns a String that describes each BluetoothGattConnectionSettings parameter current value.

Public methods

getTransport

fun getTransport(): Int

Returns the transport to be used for GATT connection.

Return
Int Value is one of the following:

isAutoConnectEnabled

fun isAutoConnectEnabled(): Boolean

Returns true if auto connection enabled or false otherwise.

isAutomaticMtuEnabled

fun isAutomaticMtuEnabled(): Boolean

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

isOpportunisticEnabled

fun isOpportunisticEnabled(): Boolean

Returns if the GATT connection is opportunistic or not.

toString

fun toString(): String

Returns a String that describes each BluetoothGattConnectionSettings parameter current value.

Return
String a string representation of the object.