Android BLE API methods for reading some characteristics are Asynchronous in nature and when you request some value, your GATT callback method is called.
If you requ
Possible Solution #6: try the Task feature provided by https://github.com/BoltsFramework/Bolts-Android :-)
Pseudo code:
1) Use a FIFO Queue or Priority Queue depends upon your business logic
2) insert all the characteristics you want to read
3) call your requestCharacteristics method so that it can start consuming your Queue
4) from your onCharacteristicsRead
call see if the size of the queue is greater than Zero request one more.. be sure to peek()
from here
5) now on your requestCharacteristics method do the poll()
and request BLE GATT for characteristic.
You might have discovered it yourself already, but it might be useful for others.
I didn't understand if that so why they made methods Async.
They probably did it because sending a read-request to another device in synchronous execution would mean you cannot do anything with your app until an answer is received. By making it Async you can do other stuff, but no other bluetooth requests.