Esempio n. 1
0
        private static async Task <BluetoothLEScan> PlatformRequestLEScan(BluetoothLEScanOptions options)
        {
            if (options == null)
            {
                return(new BluetoothLEAdvertisementWatcher());
            }

            return(new BluetoothLEAdvertisementWatcher(options));
        }
Esempio n. 2
0
        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;
        }
Esempio n. 3
0
 public static Task <BluetoothLEScan> RequestLEScanAsync(BluetoothLEScanOptions options = null)
 {
     return(PlatformRequestLEScan(options));
 }
Esempio n. 4
0
 private static async Task <BluetoothLEScan> PlatformRequestLEScan(BluetoothLEScanOptions options)
 {
     return(new BluetoothLEScan(options));
 }
Esempio n. 5
0
 private static async Task <BluetoothLEScan> PlatformRequestLEScan(BluetoothLEScanOptions options)
 {
     return(new BluetoothLEScan(options, _manager.Adapter.BluetoothLeScanner));
 }
Esempio n. 6
0
 private static Task <BluetoothLEScan> PlatformRequestLEScan(BluetoothLEScanOptions options)
 {
     return(Task.FromException <BluetoothLEScan>(new PlatformNotSupportedException()));
 }