AltBeacon / android-beacon-library

Allows Android apps to interact with BLE beacons
Apache License 2.0
2.83k stars 834 forks source link

Cannot scanBleDevices after calling addRangeNotifier function. #1099

Closed HoangKimToi closed 1 year ago

HoangKimToi commented 1 year ago

Hi! I am developing an application that uses both libraries: https://github.com/AltBeacon/android-beacon-library https://github.com/dariuszseweryn/RxAndroidBle

I can still call the scanBleDevices function the first 2 times but the 3rd time nothing happens after that. The function does not return a result or an error. The steps to run my code are as follows:

  1. I call the function startRangingBeacons and when there are results returned from addRangeNotifier. I stop Beacon scanning with stopRangingBeacons function and removeAllRangeNotifiers.

  2. After stopping the Beacon I called scanBleDevices. Now only the first 2 times my device finds BLE, the 3rd time nothing happens anymore.

Does anyone have a solution for this problem?