double distance = Utils.computeAccuracy(nearestBeacon); showToast(String.format("%.2f", distance));
I believe it returns in meter ? But even if my beacon sits on top of my android I’m still getting a value of 2.40 ?
double distance = Utils.computeAccuracy(nearestBeacon); showToast(String.format("%.2f", distance));
I believe it returns in meter ? But even if my beacon sits on top of my android I’m still getting a value of 2.40 ?
This is why we call it “accuracy” and not “distance” (:
Basically, it’s some value that goes down as you move closer to the beacon, and vice versa. So it can be used to estimate which beacon might the closest, and a more-or-less whether you’re close to a beacon or not.
Due to the nature of the 2.4 GHz Bluetooth radio waves, and the differences in Bluetooth antennas in different smartphones, it’s hard to get accurate distance estimations without, e.g., calibrating your app against each single Android device available.
For many use cases, general proximity is enough to provide a good experience. What app are you working on?