android-bluetoothandroid-ble

Does Android have an equivalent of iOS's Core Bluetooth canSendWriteWithoutResponse?


While implementing firmware updates, we've noticed that different Android phones seem to have different levels of reliability regarding GATT characteristic writes without response. Some will block the caller until the BLE stack is ready to accept a packet, but others will drop the packet client-side. Is there an equivalent to iOS CoreBluetooth canSendWriteWithoutResponse(), or other method to confirm that the BLE stack has space for another packet before submitting?


Solution

  • Yes, simply wait for the onCharacteristicWrite callback before sending the next write.

    See https://stackoverflow.com/a/43744888/556495 for more info.