Hello,
A fragment of my Android Application need to know the value of 5 characteristics of my CC2650 to built these components (text field, switch on/off for exemple).
But, the problem is read multiple characteristic need time. And for exemple, if i do :
private void loadBLEData(){ mBluetoothLeService.readCharacteristic(characteristic1); mBluetoothLeService.readCharacteristic(characteristic2); mBluetoothLeService.readCharacteristic(characteristic3); mBluetoothLeService.readCharacteristic(characteristic4); mBluetoothLeService.readCharacteristic(characteristic5); }
I only obtain the value of one or two, sometimes 4-5 characteristic, but not the rest, because readCharacteristic is asynchron right?
I call my function loadBLEData on my main thread (in onCreateView() on my fragment).
I know this not the best way, because this behaviours is random, and not clean.
That why i ask to you, how i can do this ?
Thank's you a lot.
Best regards,
Steeve