public static class BondRetryFilter.DefaultBondRetryFilter extends java.lang.Object implements BondRetryFilter
BondRetryFilter
that SweetBlue uses. To provide custom logic on when to retry the bond attempt, you should override
the BondRetryFilter.onEvent(RetryEvent)
method. This will retry the bond only if the bond attempt was direct, in that
BleDevice.bond(BondListener)
, or BleDevice.bond()
was called, and if we think it's a possible retry situation.
See BondRetryFilter.RetryEvent.possibleRetry()
.BondRetryFilter.DefaultBondRetryFilter, BondRetryFilter.Please, BondRetryFilter.RetryEvent, BondRetryFilter.Status
Constructor and Description |
---|
DefaultBondRetryFilter()
Constructor which sets the max bond retries to
BleDeviceConfig.DEFAULT_MAX_BOND_RETRIES before giving up. |
DefaultBondRetryFilter(int maxRetries)
Constructor which allows you to specify the maximum number of bond retry attempts before giving up.
|
Modifier and Type | Method and Description |
---|---|
BondRetryFilter.Please |
onEvent(BondRetryFilter.RetryEvent e) |
public DefaultBondRetryFilter(int maxRetries)
public DefaultBondRetryFilter()
BleDeviceConfig.DEFAULT_MAX_BOND_RETRIES
before giving up.public BondRetryFilter.Please onEvent(BondRetryFilter.RetryEvent e)
onEvent
in interface BondRetryFilter
onEvent
in interface GenericListener_T<BondRetryFilter.RetryEvent,BondRetryFilter.Please>