title: Plugin.BLE for Xamarin.Forms not detecting devices
body: <p>I recently started development on an Android and iOS application using Xamarin.Forms. I need to detect and connect to a custom embedded device using BLE, however, I was unsuccessful until now. I tried to use the <a href="https://github.com/xabre/xamarin-bluetooth-le" rel="noreferrer">Plugin.BLE</a> NuGet package, but the app just doesn't seem to detect any device. However, it does respond to changes in the status of the phone's Bluetooth connection (ON/OFF). I tried to pair the device beforehand, but it made no difference. I also tried to check for devices with another app from the Play store, and I can see the respective device there. The code is being run from the <code>MainPage.xaml.cs</code> of the Shared Project after <code>InitializeComponent()</code>. The device that I'm testing the application on is a Google Pixel XL running Android 8.1. Nothing changed when I tried to use a Samsung Galaxy S7 with Android 7.</p>
  
  <p>This is the code that I used, straight from the official documentation.</p>
  
  <p><strong>Code sample:</strong></p>
  
  <pre><code>private async void BLE()
  {
     var ble = CrossBluetoothLE.Current;
     var adapter = CrossBluetoothLE.Current.Adapter;
     var state = ble.State;
  
     adapter.ScanMode = Plugin.BLE.Abstractions.Contracts.ScanMode.LowLatency;
  
     adapter.ScanTimeout = 5000;
  
     ble.StateChanged += (s, e) =&gt;
     {
        i++;
        this.display.Text = "The bluetooth state changed, iteration  " + i;
        Debug.WriteLine($"The bluetooth state changed to {e.NewState}");
     };
  
     adapter.DeviceDiscovered += (s, a) =&gt; 
     {
        //  Debug.WriteLine(a.Device);
        eviceList.Add(a.Device.ToString());
       Debug.WriteLine("Device list: " + a.Device);
     };
  
     adapter.DeviceAdvertised += (s, a) =&gt;
     {
        Debug.WriteLine("Device advertised: " + a.Device);
     };
  
     await adapter.StartScanningForDevicesAsync();
  }
  </code></pre>
  
  <p><strong>Permissions:</strong></p>
  
  <pre><code>&lt;uses-permission android:name="android.permission.ACCESS_COARSE_LOCATION" /&gt;
  &lt;uses-permission android:name="android.permission.ACCESS_FINE_LOCATION" /&gt;
  &lt;uses-permission android:name="android.permission.BLUETOOTH" /&gt;
  &lt;uses-permission android:name="android.permission.BLUETOOTH_ADMIN" /&gt;
  </code></pre>