ReactiveBeacons icon indicating copy to clipboard operation
ReactiveBeacons copied to clipboard

Detecting when beacon signal is lost

Open mseroczynski opened this issue 7 years ago • 2 comments

Thanks for amazing lib, much better than anything I've tried before :).

Is it currently possible with already implemented api to determine when beacon gets out of range? I've checked sources and it looks like viewed collection (on list) works as 'discovered? add to list and forget forever'. Am I understanding correctly that such feature (checking when the signal was last active, and outdating it after x seconds) needs to be implemented outside of lib?

mseroczynski avatar May 15 '17 00:05 mseroczynski

Hi,

thanks for reporting the issue. Right now, library simply scans beacons around and displays them as soon as they're visible to the scanning device. It's much simpler approach than most BLE APIs provide. In other APIs for Beacons like Estimote or Kontakt.io there's concept of ranging and monitoring, but ReactiveBeacons doesn't have it.

Detecting when the beacon signal is lost is not implemented in the library, but I think it could be possible to implement it with library API. We need to detect the situation when beacon with specified MAC address is detected for the first time with a proper subscription, save it somewhere and then subscribe stream of beacons and check if the previously detected beacon is available on the list. If not, we may consider beacon signal as lost.

pwittchen avatar May 15 '17 09:05 pwittchen

I've created issue #79 for that feature. It can be a subject of implementation in the future.

pwittchen avatar May 15 '17 09:05 pwittchen