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
See also:
Summary
Nested classes | |
|---|---|
class |
BluetoothGattConnectionSettings.Builder
Builder for |
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 |
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. |
Content and code samples on this page are subject to the licenses described in the Content License. Java and OpenJDK are trademarks or registered trademarks of Oracle and/or its affiliates.
Last updated 2026-02-26 UTC.