public interface DiscoveryListener extends GenericListener_Void<DiscoveryListener.DiscoveryEvent>
BleManager.setListener_Discovery(DiscoveryListener)
to receive
callbacks when a device is newly discovered, rediscovered, or undiscovered after calling various BleManager.startScan()
or BleManager.startPeriodicScan(Interval, Interval)
methods. You can also provide this to various
overloads of BleManager.startScan()
and BleManager.startPeriodicScan(Interval, Interval)
.
GenericListener_Void.onEvent(Event)
is called when the discovery lifecycle of a device is updated.
BleDevice.getLastDisconnectIntent()
. If it is State.ChangeIntent.UNINTENTIONAL
then from a user-experience perspective it's most often best to automatically connect without user confirmation.Modifier and Type | Interface and Description |
---|---|
static class |
DiscoveryListener.DiscoveryEvent
Struct passed to
onEvent(DiscoveryEvent) . |
static class |
DiscoveryListener.LifeCycle
Enumerates changes in the "discovered" state of a device.
|
Modifier and Type | Method and Description |
---|---|
void |
onEvent(DiscoveryListener.DiscoveryEvent e) |
void onEvent(DiscoveryListener.DiscoveryEvent e)
onEvent
in interface GenericListener_Void<DiscoveryListener.DiscoveryEvent>