-
- All Implemented Interfaces:
-
com.pointrlabs.core.management.interfaces.Advertiser
public abstract class CycledLeScanner extends PTRAdvertiserImpl<CycledLeScanCallback>
Created by Dilara on 16.08.2017. Imported from AltBeacon http://altbeacon.org/
-
-
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, BluetoothCrashResolver crashResolver, ConfigurationManager configurationManager)
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()
void
destroy()
void
setScanFilters(List<ScanFilter> filters)
Updates the current scan filters void
restartScanning()
Restart scanning if already started. -
Methods inherited from class com.pointrlabs.core.util.PTRAdvertiserImpl
addListener, advertise, getListeners, getLock, isListenersEmpty, removeAllListeners, removeListener, setListeners
-
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
-
-
Method Detail
-
createScanner
@NonNull() static CycledLeScanner createScanner(Context context, long scanPeriod, long betweenScanPeriod, boolean backgroundFlag, BluetoothCrashResolver crashResolver, ConfigurationManager configurationManager)
-
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()
-
destroy
@MainThread() void destroy()
-
setScanFilters
void setScanFilters(List<ScanFilter> filters)
Updates the current scan filters
- Parameters:
filters
- to set as Scan Filters
-
restartScanning
@MainThread() void restartScanning()
Restart scanning if already started. Won't restart if not started
-
-
-
-