public class ForceScanConfiguration
extends java.lang.Object
BluetoothAdapter
) performs scan restart
periodically.
Please note that parameters specified in MINIMAL predefined constant are the
lowest possible. Any attempt of setting configuration with lower parameters
will be validated with IllegalArgumentException.
It is advisable to make SDK-based application configurable per
Android device e.g. by allowing changing ForceScanConfiguration
parameters in preferences. Ignoring it may cause poor performance of
features provided for the SDK.Modifier and Type | Field and Description |
---|---|
static ForceScanConfiguration |
DISABLED
Applying this predefined constant causes scan forcing to be disabled.
|
static ForceScanConfiguration |
MINIMAL
Predefined default Force Scan Configuration.
|
Constructor and Description |
---|
ForceScanConfiguration(long forceScanActivePeriod,
long forceScanPassivePeriod)
Instantiates a new Force Scan Configuration.
|
Modifier and Type | Method and Description |
---|---|
long |
getForceScanActivePeriod()
Provides force scan active period (in milliseconds).
|
long |
getForceScanPassivePeriod()
Provides force scan passive period (in milliseconds).
|
public static final ForceScanConfiguration DISABLED
public static final ForceScanConfiguration MINIMAL
public ForceScanConfiguration(long forceScanActivePeriod, long forceScanPassivePeriod)
forceScanActivePeriod
- the force scan active period [ms]forceScanPassivePeriod
- the force scan passive period [ms]public long getForceScanActivePeriod()
public long getForceScanPassivePeriod()