title: Android BLE- ScanCallBack is never called on BluetoothLeScanner.startScan()
body: <p>I'm trying to develop a Beacon locator using the BluetoothLeScanner but the problem is that ScanCallBack is never called, to be precise neither of the methods onScanResult, onScanFailed nor onBatchScanResults is called. 
  I have beacon emitter located near me which are detected by beacon locator apps available on play store. I'm not sure if I'm missing anything. Following is the code I'm using.</p>
  
  <p>First I added following permissions in my manifest:</p>
  
  <pre><code>&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;
  </code></pre>
  
  <p>Code to create an object of BluetoothLeScanner:</p>
  
  <pre><code> Intent enableBtIntent = new Intent(BluetoothAdapter.ACTION_REQUEST_ENABLE);
   getApplicationContext().startActivity(enableBtIntent);
   mBluetoothAdapter = BluetoothAdapter.getDefaultAdapter();
   mBluetoothLeScanner = mBluetoothAdapter.getBluetoothLeScanner();
   mBluetoothLeScanner.startScan(mScanCallback);
  </code></pre>
  
  <p>ScanCallBack:</p>
  
  <pre><code>protected ScanCallback mScanCallback = new ScanCallback() {
  @Override
      public void onScanResult(int callbackType, ScanResult result) {
      ScanRecord mScanRecord = result.getScanRecord();
      byte[] manufacturerData = mScanRecord.getManufacturerSpecificData(224);
      int mRssi = result.getRssi();
  }
  
  @Override
  public  void  onScanFailed(int errorCode){
      Toast.makeText(getApplicationContext(), "Failed", Toast.LENGTH_LONG);
  }
  };
  </code></pre>
  
  <p>I also made sure that none of the object values are null, all of them are perfect initialized. Also, tested on multiple devices with API 24 so I don't think that is also an issue. 
  Appreciate your help.</p>
  
  <p>Thanks</p>