private static async Task <BluetoothLEScan> PlatformRequestLEScan(BluetoothLEScanOptions options) { if (options == null) { return(new BluetoothLEAdvertisementWatcher()); } return(new BluetoothLEAdvertisementWatcher(options)); }
internal BluetoothLEScan(BluetoothLEScanOptions options, BluetoothLeScanner scanner) { _options = options; if (options != null) { _filters = options.Filters; } //var settings = new ScanSettings.Builder().SetScanMode(ScanMode.LowLatency).Build(); _callback = new Callback(this); _scanner = scanner; scanner.StartScan(_callback); Active = true; }
public static Task <BluetoothLEScan> RequestLEScanAsync(BluetoothLEScanOptions options = null) { return(PlatformRequestLEScan(options)); }
private static async Task <BluetoothLEScan> PlatformRequestLEScan(BluetoothLEScanOptions options) { return(new BluetoothLEScan(options)); }
private static async Task <BluetoothLEScan> PlatformRequestLEScan(BluetoothLEScanOptions options) { return(new BluetoothLEScan(options, _manager.Adapter.BluetoothLeScanner)); }
private static Task <BluetoothLEScan> PlatformRequestLEScan(BluetoothLEScanOptions options) { return(Task.FromException <BluetoothLEScan>(new PlatformNotSupportedException())); }