Proximity enter/exit latency


How fast can the ProximityObserver detect the enter/exit? I did some testing, it varies to seconds, if there any config to make the latency below 1s?


It’s hard to speak about latency in the context of the Proximity SDK, because the enter/exit trigger range is not exact. What exactly are you trying to do?


It is expected to announce the enter event with low latency, desired to be < 1s. So if it is close to the beacon, it should quick announce the event. Exit is less important,

Does the ProximityObserver poll the distance? is there any way to expose the polling frequency.


How would you propose to measure that?

Say, for example, you set the desired enter trigger distance to 1 m. This means that as soon as our internal algorithms determine that the distance to the beacon is 1 m, they trigger an enter. Does that mean 0 latency? Probably not, as we’re doing some computations to smooth the signal, so even in a perfect world with 100% accuracy, there would be slight delay.

But to complicate things even more, it’s not a perfect world, and the Bluetooth radio waves are tricky, so e.g. you might be 2 m away from the beacon, but we get a spike in the signal strength enough to trigger the enter. Does that mean “negative” latency, because you got the event sooner than expected? :smiley: Probably not, it’s an accuracy problem, not a latency problem.

Similar, what if you’re 1 m away from the beacon, but somebody is obstructing the signal, and our internal algorithm thinks you’re really 2 m away. That person moves away after 1 minute, and now we trigger the enter. Does that mean 1-minute latency? Again, probably not, b/c it’s more of an accuracy problem.

That’s why we don’t think it makes sense to try and define latency for Proximity enter/exits.

TL;DR If you’re trying to e.g., build a race-track system and detect when a runner/cycler/etc. passes a beacon with < 1 s precision, then beacons are probably not a good fit for that. If you need to know when somebody is within a certain area with some reasonable leeway (say, something between 1-30 seconds), then Proximity should be fine.