Closed ahdam closed 4 years ago
I think that is a ReactNative hot reload issue. When RN reloads your app, the app itself is killed. The app does not call componentUnmount which would close the BLE scanning and broadcasting functions and clear all the events. :( Not sure how to solve it.
I'm using a Samsung Galaxy S7 and Nexus X5 (both have BLE 4.2) to test the example.
The weird thing is everything works fine the first time I run the app after I install it (even if one app is running in the background). If I restart the app, "onDeviceFound" event never triggers.
If I uninstall the app, install it again and run it, everything works fine.