-
public abstract class CycledLeScanner
-
-
Field Summary
Fields Modifier and Type Field Description public final static long
ANDROID_N_MAX_SCAN_DURATION_MILLIS
-
Method Summary
Modifier and Type Method Description static CycledLeScanner
createScanner(Context context, long scanPeriod, long betweenScanPeriod, boolean backgroundFlag, CycledLeScanCallback cycledLeScanCallback, BluetoothCrashResolver crashResolver)
void
setLongScanForcingEnabled(boolean enabled)
Enables the scanner to go to extra lengths to keep scans going for longer than would otherwise be allowed. void
setScanPeriods(long scanPeriod, long betweenScanPeriod, boolean backgroundFlag)
Tells the cycler the scan rate and whether it is in operating in background mode. void
start()
void
stop()
boolean
getDistinctPacketsDetectedPerScan()
void
setDistinctPacketsDetectedPerScan(boolean detected)
void
destroy()
-
-
Method Detail
-
createScanner
static CycledLeScanner createScanner(Context context, long scanPeriod, long betweenScanPeriod, boolean backgroundFlag, CycledLeScanCallback cycledLeScanCallback, BluetoothCrashResolver crashResolver)
-
setLongScanForcingEnabled
void setLongScanForcingEnabled(boolean enabled)
Enables the scanner to go to extra lengths to keep scans going for longer than would otherwise be allowed. Useful only for Android N and higher.
-
setScanPeriods
@MainThread() void setScanPeriods(long scanPeriod, long betweenScanPeriod, boolean backgroundFlag)
Tells the cycler the scan rate and whether it is in operating in background mode. Background mode flag is used only with the Android 5.0 scanning implementations to switch between LOW_POWER_MODE vs. LOW_LATENCY_MODE
-
start
@MainThread() void start()
-
stop
@MainThread() void stop()
-
getDistinctPacketsDetectedPerScan
@AnyThread() boolean getDistinctPacketsDetectedPerScan()
-
setDistinctPacketsDetectedPerScan
@AnyThread() void setDistinctPacketsDetectedPerScan(boolean detected)
-
destroy
@MainThread() void destroy()
-
-
-
-