-
public abstract class CycledLeScanner
-
-
Field Summary
Fields Modifier and Type Field Description public final static longANDROID_N_MAX_SCAN_DURATION_MILLIS
-
Method Summary
Modifier and Type Method Description static CycledLeScannercreateScanner(Context context, long scanPeriod, long betweenScanPeriod, boolean backgroundFlag, CycledLeScanCallback cycledLeScanCallback, BluetoothCrashResolver crashResolver)voidsetLongScanForcingEnabled(boolean enabled)Enables the scanner to go to extra lengths to keep scans going for longer than wouldotherwise be allowed. voidsetScanPeriods(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 switchbetween LOW_POWER_MODE vs. voidstart()voidstop()voiddestroy()-
-
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 wouldotherwise 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 switchbetween LOW_POWER_MODE vs. LOW_LATENCY_MODE
-
start
@MainThread() void start()
-
stop
@MainThread() void stop()
-
destroy
@MainThread() void destroy()
-
-
-
-