RxFitbitGatt / com.fitbit.bluetooth.fbgatt.rx.scanner / PeripheralScanner

PeripheralScanner

class PeripheralScanner

Reactive interface for scanning devices

This class is designed to support to only run one scan at any given time. When you start a scan any previous ongoing scan operation will get canceled before starting new scan operation.

Types

ScanEvent

sealed class ScanEvent

Events encountered during a device scan

Constructors

<init>

PeripheralScanner(fitbitGatt: FitbitGatt = FitbitGatt.getInstance())

Reactive interface for scanning devices

Functions

scanForDevices

fun scanForDevices(context: Context, scanFilters: List<PeripheralScannerFilter> = emptyList(), resetExistingFilters: Boolean = false, cancelScanOnDispose: Boolean = true): Observable<ScanEvent>

Scan for devices and emits ScanEvents. Will scan until disposed,