title: Android BLE BluetoothGatt.writeDescriptor() return sometimes false
body: <p>I'm trying to write BLE Android app. I found that sometimes when I call 
  <a href="https://developer.android.com/reference/android/bluetooth/BluetoothGatt.html#writeDescriptor(android.bluetooth.BluetoothGattDescriptor)" rel="noreferrer">BluetoothGatt.writeDescriptor()</a> it returns false.</p>
  
  <p>I have not found in documentation any note of limitation to this function. But ppl on stack overflow says that I need to wait for <a href="https://developer.android.com/reference/android/bluetooth/BluetoothGattCallback.html#onDescriptorWrite(android.bluetooth.BluetoothGatt,%20android.bluetooth.BluetoothGattDescriptor,%20int)" rel="noreferrer">BluetoothGattCallback.onDescriptorWrite()</a> before I try to write another descriptor. </p>
  
  <p>Here is one reply saying that <a href="https://stackoverflow.com/a/36169096/1093607">BLE is busy</a> with writeDescriptor() and can not do other write. </p>
  
  <p>Here is <a href="https://stackoverflow.com/a/24178815/1093607">another thread</a> saying that you can not call twice writeCharacteristic().</p>
  
  <p>My questions are</p>
  
  <ul>
  <li>is it really true? </li>
  <li>is there really missing some internal android API buffer for serializing BLE requests and every developer has to do it on it's own? </li>
  <li>Is it true for different functions? For example when I call <code>writeDescriptor()</code> I understand I can not call second time <code>writeDescriptor()</code> before I receive <code>onDescriptorWrite()</code>. But do I have to wait for <code>onDescriptorWrite()</code> when I want to call <code>writeCharacteristic()</code>? </li>
  <li>Also if there is inter-function dependency then what else function have this limitation (namely: <code>readCharacteristic()</code>, <code>readDescriptor()</code>, <code>requestMtu()</code>...)? </li>
  <li>And additionally is there interdependency between BluetoothGattServer and BluetoothGatt. So for example when I call <code>BluetoothGattServer.notifyCharacteristicChanged()</code> shall I wait for<a href="https://developer.android.com/reference/android/bluetooth/BluetoothGattServerCallback.html#onNotificationSent(android.bluetooth.BluetoothDevice,%20int)" rel="noreferrer"><code>BluetoothGattServerCallback.onNotificationSent</code></a> before I can call <code>BluetoothGatt.writeDescriptor()</code> or <code>BluetoothGatt.writeCharacteristic()</code>? (BTW praise for google documentation <code>onNotificationSent()</code> is by luck documented properly. Doc says:</li>
  </ul>
  
  <blockquote>
    <p>When multiple notifications are to be sent, an application must wait
    for this callback to be received before sending additional
    notifications.</p>
  </blockquote>
  
  <ul>
  <li>Lastly having all this questions - I feel that Android BLE API is under-documented. Or am I wrong and there is documented somewhere what are allowed methods calling sequences? If yes can you please point me to such documentation? If not is there some channel we can open issue with google and ask them to add to documentation something? I mean it may not be much text - some function like <code>onNotificationSent()</code> is arleady properly documented. They just need to copy this sentence to other functions. </li>
  </ul>