public async Task <List <BluetoothDevice> > DiscoverPeersAsync()
        {
            if (bluetoothAdapter.IsDiscovering)
            {
                Console.WriteLine("Canceled existing discovery");
                bluetoothAdapter.CancelDiscovery();
            }

            var filter1 = new IntentFilter(BluetoothAdapter.ActionDiscoveryStarted);
            var filter2 = new IntentFilter(BluetoothDevice.ActionFound);
            var filter3 = new IntentFilter(BluetoothAdapter.ActionDiscoveryFinished);
            var filter5 = new IntentFilter(BluetoothDevice.ActionUuid);

            var discoveryContext = new DiscoveryContext(applicationContext, bluetoothAdapter);

            applicationContext.RegisterReceiver(discoveryContext.Receiver, filter1);
            applicationContext.RegisterReceiver(discoveryContext.Receiver, filter2);
            applicationContext.RegisterReceiver(discoveryContext.Receiver, filter3);
            applicationContext.RegisterReceiver(discoveryContext.Receiver, filter5);

            if (bluetoothAdapter.ScanMode != ScanMode.ConnectableDiscoverable)
            {
                EnableDiscovery();
            }

            bluetoothAdapter.StartDiscovery();

            var peers = await discoveryContext.FetchResultsAsync().ConfigureAwait(false);

            applicationContext.UnregisterReceiver(discoveryContext.Receiver);

            if (bluetoothAdapter.IsDiscovering)
            {
                Console.WriteLine("Warning: Still IsDiscovering");
            }
            return(peers);
        }