How to estimate distance between two android devices? (bluetooth preferred)

You can measure distance with sound.


The only feasible way to do it that I can think of is with NFC. To use Bluetooth or Wi-Fi you'd have to do it via signal strength, but every transmitter is different so that wouldn't be reliable at all.

Latency is rather useless since the radio waves travel at the speed of light and the time difference between traveling an inch and a mile is essentially zero. To measure that difference you'd need a much higher resolution than you have in a phone.


I've looked into bluetooth positioning and it istn' quite as easy as detecting the signal strength. For really accurate results you also need to take into account the types of phone your using, the battery type and the condition of the battery. You also have to take into account the environment and how it might efffect the signal strength, and also obstacles that may interfere with the signal, such as people, walls, tables, etc.

To determine the distance you would also need to use triangulation techniques to determine the position of a mobile. You can also set up a number transmitters in your environment and measure against each one. Knowing the positions of these transmitters you can then work out the position of the phone.

However, the signal strengths will vary and you will have to do a lot of calibration. There a number of scientific papers that give some insight into the algorythms required. There are also a couple of companies that provide this as a service, used in malls, museums etc.

That said, if you can get the signal strength then you should be able to work out a basic near or far result, it just won't be fully accurate, and in this case i still think having a number of transmitters would still help a lot.

Paper, some of the pitfalls PDF(download), another paper

THere are loads of papers i've read from googling bluetooth positioning that will give you some pointers.