title: Bluetooth LE 'onConnectionStateChange' will not called after 'connectGatt'
body: <p>I'm working on a project with Bluetooth LE on Android-Studios in Java.
  Unfortunately I'm stucked on the process between connectGatt() &lt;-&gt; onConnectionStateChange().
  After each onScanResult I try to connect to the found device: <a href="https://i.stack.imgur.com/yuHzs.png" rel="nofollow noreferrer">Logcat-Output</a>. This happens ~20 times repeatly, without that 'onConnectionStateChange' will called. After that it closes all connections automatically, probably by Android, because of to much connections 'onConnectionStateChange' (because of 'disconnect') will called.</p>
  <p>'connectGatt' calls 'connect', but doesn't call, whyever, 'onConnectionStateChange' - so I guess the issue is 'connectGatt'.</p>
  <p><strong>Simple Pseudo Code of my problem:</strong></p>
  <pre><code>btLeScanner.startScan(scanCallback);
  
  public class BtLeScanCallback extends ScanCallback {
      @Override
          public void onScanResult(int callbackType, ScanResult result) {
              BluetoothDevice device = result.getDevice();
              BluetoothGatt bluetoothGatt = device.connectGatt(context, autoConnect, callback, BluetoothDevice.TRANSPORT_LE);
          }
     
  public class BtGattCallback extends BluetoothGattCallback {
      @Override
      public void onConnectionStateChange(BluetoothGatt gatt, int status, int newState) {
          Log.i(TAG, &quot;ConnectionState: &quot; + newState);
  
          switch (newState){
              case STATE_CONNECTED:
                  Log.i(TAG, &quot;State connected.&quot;);
                  gatt.discoverServices();
                  break;
              case STATE_DISCONNECTED:
                  Log.i(TAG, &quot;State disconnected.&quot;);
                  gatt.close();
                  break;
              }
      }
  </code></pre>
  <p>Does anyone have any idea? :D
  I would be so grateful.</p>