Handler Post Execute Queue Not In Correct Order
i'm working on android application which have communication with Bluetooth BLE device (with custom protocol which was developed specific for our product). after i connect to the de
Solution 1:
You have a bug in your code. You need to extract the value from the characteristic before you post your Runnable. Otherwise when the Runnable later runs and extracts the value, it will be the newest one.
Web Bluetooth implementation in Chromium made the same mistake. See https://bugs.chromium.org/p/chromium/issues/detail?id=647673&desc=2.
But also note that in newer versions of Android you can set a handler in connectGatt directly.
Post a Comment for "Handler Post Execute Queue Not In Correct Order"