I am developing an application, that uses iBeacons. Its main feature is to detect the nearest beacon (distance does not matter, I need simply the nearest one) and present some content according to it.
On IOS it works like a charm, there is no question.
On Android I have strange experiences. I know, it is up to the hardware, bluetooth chip vendor etc. but even if a I tried a lot of things (averaging rssi, queing...), I can't make it stable. The beacons are some 3-5 meters away from each other, there are 8 pieces of them in a ~80 square meters room.
I use Android AltBeacon library. I can not detect the nearest beacon in a stable way: sometimes a Beacon, which is some 5 meters away from the device is 'nearer' by RSSI, than a beacon, which is right next to the device and so on. (beacons use the same TX power and advertising interval, altbeacon scanperiod is 250 msec)
What should I do to make it stable? What, when and how should I average rssi? Or should I do it at all? Or...?
Thank you very much!