Closed Reyes2005 closed 4 months ago
Can you provide more information on what "blocks the program" means? I, obivously, have an idea, but the code for this hasn't changed since the start of the library, and unless something changed on the Android or React Native side, it should be passing promises and handling threading appropriately between the two.
Shows the code, it is calling adapter.getBondedDevices
and looking at that
https://developer.android.com/reference/android/bluetooth/BluetoothAdapter#getBondedDevices()
It should return back quickly, there are no notes stating that this method should be wrapped in a separate thread on the android side of things.
Is it possible that you're doing something else at the same time? Can you debug the android code and confirm that it is infact causing a long pause on that request?
Device: [Android14]
OS: [API31]
React Native version: [v0.74.2]
RN Bluetooth Classic version: [v1.73.0-rc.8]
The problem occurs when trying to use the getBondedDevices function, since executing it blocks the program and no button or state change works. The example code is the next: