コード例 #1
0
        private static async Task <BluetoothLEScan> PlatformRequestLEScan(BluetoothLEScanOptions options)
        {
            if (options == null)
            {
                return(new BluetoothLEAdvertisementWatcher());
            }

            return(new BluetoothLEAdvertisementWatcher(options));
        }
コード例 #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;
        }
コード例 #3
0
 public static Task <BluetoothLEScan> RequestLEScanAsync(BluetoothLEScanOptions options = null)
 {
     return(PlatformRequestLEScan(options));
 }
コード例 #4
0
ファイル: Bluetooth.unified.cs プロジェクト: ulebule/32feet
 private static async Task <BluetoothLEScan> PlatformRequestLEScan(BluetoothLEScanOptions options)
 {
     return(new BluetoothLEScan(options));
 }
コード例 #5
0
 private static async Task <BluetoothLEScan> PlatformRequestLEScan(BluetoothLEScanOptions options)
 {
     return(new BluetoothLEScan(options, _manager.Adapter.BluetoothLeScanner));
 }
コード例 #6
0
ファイル: Bluetooth.standard.cs プロジェクト: ulebule/32feet
 private static Task <BluetoothLEScan> PlatformRequestLEScan(BluetoothLEScanOptions options)
 {
     return(Task.FromException <BluetoothLEScan>(new PlatformNotSupportedException()));
 }