public enum BleScanPower extends java.lang.Enum<BleScanPower>
ScanSettings
for setting the scanning power
when using the Lollipop scanning API. This is ONLY valid on devices running Lollipop, or higher.Enum Constant and Description |
---|
AUTO
SweetBlue will automatically set the scan power depending on if the app is in the foreground or not.
|
HIGH_POWER
Lollipop-and-up-relevant-only, this is strict typing for
ScanSettings.SCAN_MODE_LOW_LATENCY . |
LOW_POWER
Lollipop-and-up-relevant-only, this is strict typing for
ScanSettings.SCAN_MODE_LOW_POWER . |
MEDIUM_POWER
Lollipop-and-up-relevant-only, this is strict typing for
ScanSettings.SCAN_MODE_BALANCED . |
VERY_LOW_POWER
Lollipop-and-up-relevant-only, this is strict typing for
ScanSettings.SCAN_MODE_OPPORTUNISTIC . |
Modifier and Type | Method and Description |
---|---|
int |
getNativeMode() |
static BleScanPower |
valueOf(java.lang.String name)
Returns the enum constant of this type with the specified name.
|
static BleScanPower[] |
values()
Returns an array containing the constants of this enum type, in
the order they are declared.
|
public static final BleScanPower AUTO
HIGH_POWER
will be used. If you are using an infinite scan length,
then MEDIUM_POWER
will be used instead. Otherwise, when in the background, LOW_POWER
is used.public static final BleScanPower VERY_LOW_POWER
ScanSettings.SCAN_MODE_OPPORTUNISTIC
.
For phones lower than Lollipop, this will be ignored.public static final BleScanPower LOW_POWER
ScanSettings.SCAN_MODE_LOW_POWER
.
For phones lower than Lollipop, this will be ignored.public static final BleScanPower MEDIUM_POWER
ScanSettings.SCAN_MODE_BALANCED
.
For phones lower than Lollipop, this will be ignored.public static final BleScanPower HIGH_POWER
ScanSettings.SCAN_MODE_LOW_LATENCY
.
For phones lower than Lollipop, this will be ignored.public static BleScanPower[] values()
for (BleScanPower c : BleScanPower.values()) System.out.println(c);
public static BleScanPower 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 nullpublic int getNativeMode()