public static enum DiscoveryListener.LifeCycle extends java.lang.Enum<DiscoveryListener.LifeCycle>
DiscoveryListener.DiscoveryEvent.lifeCycle()
.Enum Constant and Description |
---|
DISCOVERED
Used when a device is discovered for the first time after
calling
BleManager.startScan() (or its overloads)
or BleManager.startPeriodicScan(Interval, Interval) . |
REDISCOVERED
Used when a device is rediscovered after already being discovered at least once.
|
UNDISCOVERED
Used when a device is "undiscovered" after being discovered at least once.
|
Modifier and Type | Method and Description |
---|---|
static DiscoveryListener.LifeCycle |
valueOf(java.lang.String name)
Returns the enum constant of this type with the specified name.
|
static DiscoveryListener.LifeCycle[] |
values()
Returns an array containing the constants of this enum type, in
the order they are declared.
|
public static final DiscoveryListener.LifeCycle DISCOVERED
BleManager.startScan()
(or its overloads)
or BleManager.startPeriodicScan(Interval, Interval)
.public static final DiscoveryListener.LifeCycle REDISCOVERED
public static final DiscoveryListener.LifeCycle UNDISCOVERED
BleDeviceConfig.undiscoveryKeepAlive
. This option is disabled by default. If set, you should expect that the undiscovery
callback will take some amount of time to receive after an advertising device is turned off or goes out of range or what have you.
It's generally not as fast as other state changes like BleDeviceState.BLE_DISCONNECTED
or getting BleDeviceState.DISCOVERED
in the first place.public static DiscoveryListener.LifeCycle[] values()
for (DiscoveryListener.LifeCycle c : DiscoveryListener.LifeCycle.values()) System.out.println(c);
public static DiscoveryListener.LifeCycle valueOf(java.lang.String name)
name
- the name of the enum constant to be returned.java.lang.IllegalArgumentException
- if this enum type has no constant with the specified namejava.lang.NullPointerException
- if the argument is null