public interface BondFilter
BleDeviceConfig.bondFilter
lets the app give
a hint to the library so it can bond before attempting to read or write an encrypted characteristic.
Providing these hints lets the library handle things in a more deterministic and optimized fashion, but is not required.
Build.MANUFACTURER
is either one of those, BleDeviceConfig.DefaultBondFilter
is set to unbond upon discoveries and disconnects.
Please look at the source of BleDeviceConfig.DefaultBondFilter
for the most up-to-date spec.
The problem seems to be associated with mismanagement of pairing keys by the OS and
this brute force solution seems to be the only way to smooth things out.Modifier and Type | Interface and Description |
---|---|
static class |
BondFilter.CharacteristicEvent
Struct passed to
onEvent(CharacteristicEvent) . |
static class |
BondFilter.CharacteristicEventType
An enumeration of the type of characteristic operation for a
BondFilter.CharacteristicEvent . |
static class |
BondFilter.ConnectionBugEvent |
static class |
BondFilter.Please
Return value for the various interface methods of
BondFilter . |
static class |
BondFilter.StateChangeEvent
Just a dummy subclass of
DeviceStateListener.StateEvent so that this gets auto-imported for implementations of BondFilter . |
Modifier and Type | Method and Description |
---|---|
BondFilter.Please |
onEvent(BondFilter.CharacteristicEvent e)
Called immediately before reading, writing, or enabling notification on a characteristic.
|
BondFilter.ConnectionBugEvent.Please |
onEvent(BondFilter.ConnectionBugEvent e)
Called after bonding to a device, and the state reports as being disconnected, but the connection is still actually alive.
|
BondFilter.Please |
onEvent(BondFilter.StateChangeEvent e)
Called after a device undergoes a change in its
BleDeviceState . |
BondFilter.Please onEvent(BondFilter.StateChangeEvent e)
BleDeviceState
.BondFilter.Please onEvent(BondFilter.CharacteristicEvent e)
BondFilter.ConnectionBugEvent.Please onEvent(BondFilter.ConnectionBugEvent e)
BondFilter.ConnectionBugEvent.Please
returned
here will tell the library to attempt to fix it or not.