public static class ReconnectFilter.ConnectFailPlease
extends java.lang.Object
ReconnectFilter.onConnectFailed(ConnectFailEvent)
and ReconnectFilter.onConnectFailed(ConnectFailEvent)
.
Generally you will only return retry()
or doNotRetry()
, but there are more advanced options as well.Modifier and Type | Method and Description |
---|---|
static ReconnectFilter.ConnectFailPlease |
doNotRetry()
Return this to stop the connection fail retry loop.
|
static ReconnectFilter.ConnectFailPlease |
doNotRetryIf(boolean condition)
|
boolean |
isRetry()
Returns
true for everything except doNotRetry() . |
static ReconnectFilter.ConnectFailPlease |
retry()
Return this to retry the connection, continuing the connection fail retry loop.
|
static ReconnectFilter.ConnectFailPlease |
retryIf(boolean condition)
|
static ReconnectFilter.ConnectFailPlease |
retryWithAutoConnectFalse()
Opposite of
retryWithAutoConnectTrue() . |
static ReconnectFilter.ConnectFailPlease |
retryWithAutoConnectTrue()
Same as
retry() , but autoConnect=true will be passed to
BluetoothDevice.connectGatt(Context, boolean, android.bluetooth.BluetoothGattCallback) . |
public static ReconnectFilter.ConnectFailPlease retry()
autoConnect
passed to
BluetoothDevice.connectGatt(Context, boolean, android.bluetooth.BluetoothGattCallback)
will be false or true based on what has worked in the past, or on BleNodeConfig.alwaysUseAutoConnect
.public static ReconnectFilter.ConnectFailPlease retryIf(boolean condition)
public static ReconnectFilter.ConnectFailPlease doNotRetry()
public static ReconnectFilter.ConnectFailPlease doNotRetryIf(boolean condition)
public static ReconnectFilter.ConnectFailPlease retryWithAutoConnectTrue()
retry()
, but autoConnect=true
will be passed to
BluetoothDevice.connectGatt(Context, boolean, android.bluetooth.BluetoothGattCallback)
.
See more discussion at BleNodeConfig.alwaysUseAutoConnect
.public static ReconnectFilter.ConnectFailPlease retryWithAutoConnectFalse()
retryWithAutoConnectTrue()
.public boolean isRetry()
true
for everything except doNotRetry()
.