title: How to estimate distance between two android devices? (bluetooth preferred)
body: <p>Target is not to have the real distance. It is something simpler.<br/>
  Target is to check <strong>whether another device is very very close</strong>. True or false. Let's say 10 or 15 cms is close so our check is true and any device further away fails the check and it is false.</p>
  
  <p>My first approach was to use api's method <code>fetchUuidsWithSdp()</code> but it failed!<br/>
  Latency seemed the same whether the devices where a couple of cms away or at the other end of a large room!</p>
  
  <p>Any solution even without bluetooth is acceptable. For instance, I am totally unfamiliar with the <strong>wifi direct p2p</strong> protocol. Maybe there could be something in there useful to have a rough estimation of distance.</p>
  
  <p>Edit: I am reading about Received Signal Strength Indicator(<strong>RSSI</strong>). This could be used for our particular case, a rough estimation of distance between devices. But maybe there could be something to combine in order to improve the accuracy.</p>
  
  <p>Edit: I put Ralgha's answer to the test. I did established a connection and had a minor protocol to <strong>ping-pong</strong> among devices.<br/>
  When ping-ponged with <strong>1 byte</strong> average latency was 22.6000 msec when very close and 22.6087 msec when on the other corner of the room.<br/>
  When ping-ponged with <strong>1024 bytes</strong> average latency was 40.3173 msec when very close and even smaller, 32.3138 msec, when on the other corner of the room.<br/>
  After all, indeed, <strong>latency does not carry any information about distance</strong>!</p>
  
  <p>Thanks!</p>