-
Notifications
You must be signed in to change notification settings - Fork 835
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
AltBeacon Library startLeScan of BluetoothAdapter and stopLeScan halts the UI thread. #136
Comments
I have the same issue 😟 |
Can you please post sample code and steps to reproduce? This sounds like scanning is happening on the UI thread but I have never witnessed this myself on the Nexus 5, Nexus 9 or Moto G. |
I have experimented the exact same issue with Cyanogenmod 11. |
The issue was reproduced on the Motorola Droid Ultra 4.4.4 and Moto E 5.0.2 To reproduce "GKI_exception: out of buffers" just keep bluetooth scanning for a night. |
Have this issue been fixed? I am experiencing similar event that is blocking the main thread (list view) for Android on Nexus 5 as well. |
I think there may be a number of different issues here, which may result in a similar symptom of laggy UI when scanning for beacons. Multiple possible sources of a problem include:
In order to get a good reproducible test case that eliminates application-specific differences, it would be great to get steps to reproduce using this library's reference application, and documenting the specific Android version and library version used to reproduce the problem and how it is determined that the UI thread is blocking. It is possible that some of these reported cases may be due to application-specific implementation issues, if you think there is a chance that is the case, I'd suggest posting a question on StackOverflow describing the specific problem and showing the code that processes the beacon detections starting with the ranging callback. |
I am experiencing the same issue with AltBeacon version 2.8.1, it happened on a Motorola XT1080 Droid Maxx with Android 4.4.4 and I think I might have identified a potential reason for this to be happening. In particular, this is the method trace on the main thread in the moment several ANR were triggered by the application that's using AltBeacon:
Taking a quick look at
The Handler used is using the main thread Looper, since it's initialized when |
Start and stop BLE scans from a background thread to prevent blocking the UI (issue #136)
…eaconManager (issue AltBeacon#136)
Can this issue be closed now that #430 is merged? |
Resolved per #430 |
I observed every time the StartLeScan of the BluetoothAdapter occurs the UI hangs for a while and so is the same on the StopLeScan. It is similar to the Estimote App issue people were facing. Link of the estimote app is as below:
Estimote/Android-Fleet-Management-SDK#85. It does it both to the One Plus and the Nexus 5 device.
OS Version: CyanogenMod 4.4.4 (One Plus) Nexus 5 (5.0.1)
Devices tested: One Plus,Nexus 5
The text was updated successfully, but these errors were encountered: