E emexes Expert Licensed User Longtime User Jul 21, 2019 #1 I am reading descriptors using the code from: https://www.b4x.com/android/forum/t...characteristic-descriptor.102483/#post-643594 but waiting for the response from the BLE device using polling: https://www.b4x.com/android/forum/t...characteristic-descriptor.102483/#post-643655 Is there a Wait For that I can use instead, that will wait for a callback from the gatt.RunMethod("readDescriptor" request?
I am reading descriptors using the code from: https://www.b4x.com/android/forum/t...characteristic-descriptor.102483/#post-643594 but waiting for the response from the BLE device using polling: https://www.b4x.com/android/forum/t...characteristic-descriptor.102483/#post-643655 Is there a Wait For that I can use instead, that will wait for a callback from the gatt.RunMethod("readDescriptor" request?
Erel B4X founder Staff member Licensed User Longtime User Jul 22, 2019 #2 You can create a sub that polls this value with a loop and a call to Sleep and then "raises an event" with CallSubDelayed(Me, "EventHappened") This will allow you to wait for it in another place. Upvote 0
You can create a sub that polls this value with a loop and a call to Sleep and then "raises an event" with CallSubDelayed(Me, "EventHappened") This will allow you to wait for it in another place.