title: BluetoothAdapter.getDefaultAdapter().startDiscovery() not working
body: <pre><code>public void startScan() {
          final List&lt;MyBluetoothDevice&gt; arrayOfFoundBTDevices = new ArrayList&lt;&gt;();
  
          // start looking for bluetooth devices
  
          mBluetoothAdapter = BluetoothAdapter.getDefaultAdapter();
          boolean scanStatus = mBluetoothAdapter.startDiscovery();
  
  
          Timber.d("SCANNING_STATUS : " + scanStatus);
  
          // Discover new devices
          // Create a BroadcastReceiver for ACTION_FOUND
          mReceiver = new BroadcastReceiver() {
              @Override
              public void onReceive(Context context, Intent intent) {
                  Timber.d("onReceiveSignal");
                  String action = intent.getAction();
                  // When discovery finds a device
                  if (BluetoothDevice.ACTION_FOUND.equals(action)) {
                      // Get the bluetoothDevice object from the Intent
                      BluetoothDevice device = intent.getParcelableExtra(BluetoothDevice.EXTRA_DEVICE);
                  } else if (BluetoothAdapter.ACTION_DISCOVERY_FINISHED.equals(action)) {
                      Timber.d("Discovery Finished ");
                      AppUtils.showToast(context, "Scanning restart");
                      mBluetoothAdapter.startDiscovery();
                  }
              }
          };
  
          IntentFilter filter = new IntentFilter();
          filter.addAction(BluetoothDevice.ACTION_FOUND);
          filter.addAction(BluetoothAdapter.ACTION_DISCOVERY_FINISHED);
          context.registerReceiver(mReceiver, filter);
      }
  </code></pre>
  
  <p>I am try to scan nearby bluetooth devices.
  But, BluetoothAdapter.getDefaultAdapter().startDiscovery() method returns false in API Level 29 but working in API Level 26</p>
  
  <p>-------------Permission defined in AndroidManifest.xml-----------
  Can't find solution for Android 10</p>
  
  <pre><code>&lt;?xml version="1.0" encoding="utf-8"?&gt;
  &lt;manifest xmlns:android="http://schemas.android.com/apk/res/android"
      package="com.example.bluetoothexample"&gt;
  
      &lt;uses-feature
          android:name="android.hardware.bluetooth"
          android:required="true" /&gt;
  
      &lt;uses-permission android:name="android.permission.BLUETOOTH" /&gt;
      &lt;uses-permission android:name="android.permission.BLUETOOTH_ADMIN" /&gt;
      &lt;uses-permission android:name="android.permission.ACCESS_COARSE_LOCATION" /&gt;
  
      &lt;application
          android:name=".App"
          android:allowBackup="true"
          android:icon="@mipmap/ic_launcher"
          android:label="@string/app_name"
          android:supportsRtl="true"
          android:theme="@style/AppTheme"&gt;
          &lt;activity android:name=".MainActivity"&gt;
              &lt;intent-filter&gt;
                  &lt;action android:name="android.intent.action.MAIN" /&gt;
                  &lt;category android:name="android.intent.category.LAUNCHER" /&gt;
              &lt;/intent-filter&gt;
          &lt;/activity&gt;
          &lt;activity android:name=".FoundBTDevices" /&gt;
      &lt;/application&gt;
  &lt;/manifest&gt;
  </code></pre>