public class ScanSettings extends java.lang.Object implements android.os.Parcelable, ExternalScanSettingsExtension
BluetoothLeScanner.startScan(android.bluetooth.le.ScanCallback) to define the
parameters for the scan.
RxAndroidBle Note: This class is basically copied from the Android AOSP. All of the exposed functionality
is emulated by the software due to a lot of potential issues with different phones:
https://code.google.com/p/android/issues/detail?id=158522
https://code.google.com/p/android/issues/detail?id=178614
https://code.google.com/p/android/issues/detail?id=228428| Modifier and Type | Class and Description |
|---|---|
static class |
ScanSettings.Builder
Builder for
ScanSettings. |
static interface |
ScanSettings.CallbackType |
static interface |
ScanSettings.MatchMode |
static interface |
ScanSettings.MatchNum |
static interface |
ScanSettings.ScanMode |
| Modifier and Type | Field and Description |
|---|---|
static int |
CALLBACK_TYPE_ALL_MATCHES
Trigger a callback for every Bluetooth advertisement found that matches the filter criteria.
|
static int |
CALLBACK_TYPE_FIRST_MATCH
A result callback is only triggered for the first advertisement packet received that matches
the filter criteria.
|
static int |
CALLBACK_TYPE_MATCH_LOST
Receive a callback when advertisements are no longer received from a device that has been
previously reported by a first match callback.
|
static android.os.Parcelable.Creator<ScanSettings> |
CREATOR |
static int |
MATCH_MODE_AGGRESSIVE
In Aggressive mode, hw will determine a match sooner even with feeble signal strength
and few number of sightings/match in a duration.
|
static int |
MATCH_MODE_STICKY
For sticky mode, higher threshold of signal strength and sightings is required
before reporting by hw
|
static int |
MATCH_NUM_FEW_ADVERTISEMENT
Match few advertisement per filter, depends on current capability and availability of
the resources in hw
|
static int |
MATCH_NUM_MAX_ADVERTISEMENT
Match as many advertisement per filter as hw could allow, depends on current
capability and availibility of the resources in hw
|
static int |
MATCH_NUM_ONE_ADVERTISEMENT
Match one advertisement per filter
|
static int |
SCAN_MODE_BALANCED
Perform Bluetooth LE scan in balanced power mode.
|
static int |
SCAN_MODE_LOW_LATENCY
Scan using highest duty cycle.
|
static int |
SCAN_MODE_LOW_POWER
Perform Bluetooth LE scan in low power mode.
|
static int |
SCAN_MODE_OPPORTUNISTIC
A special Bluetooth LE scan mode.
|
| Modifier and Type | Method and Description |
|---|---|
int |
describeContents() |
int |
getCallbackType() |
int |
getMatchMode() |
int |
getNumOfMatches() |
long |
getReportDelayMillis()
Returns report delay timestamp based on the device clock.
|
int |
getScanMode() |
boolean |
shouldCheckLocationProviderState() |
void |
writeToParcel(android.os.Parcel dest,
int flags) |
public static final int SCAN_MODE_OPPORTUNISTIC
public static final int SCAN_MODE_LOW_POWER
public static final int SCAN_MODE_BALANCED
public static final int SCAN_MODE_LOW_LATENCY
public static final int CALLBACK_TYPE_ALL_MATCHES
public static final int CALLBACK_TYPE_FIRST_MATCH
public static final int CALLBACK_TYPE_MATCH_LOST
public static final int MATCH_NUM_ONE_ADVERTISEMENT
public static final int MATCH_NUM_FEW_ADVERTISEMENT
public static final int MATCH_NUM_MAX_ADVERTISEMENT
public static final int MATCH_MODE_AGGRESSIVE
public static final int MATCH_MODE_STICKY
public static final android.os.Parcelable.Creator<ScanSettings> CREATOR
public int getScanMode()
public int getCallbackType()
public int getMatchMode()
public int getNumOfMatches()
public long getReportDelayMillis()
public boolean shouldCheckLocationProviderState()
shouldCheckLocationProviderState in interface ExternalScanSettingsExtensionpublic void writeToParcel(android.os.Parcel dest,
int flags)
writeToParcel in interface android.os.Parcelablepublic int describeContents()
describeContents in interface android.os.Parcelable