Goal
Application that after the first launch asks user for a name and remembers it. Easy.
But, it also discovers devices with application in the user's device range.
In the end, it shows a list with names of the people in the surrounding.
Example
Gus and Joe have already installed that application.
They're sitting in home, their names lists are empty. Gus goes to Joe's house.
Gus gets notification on his mobile that "oho, Joe is here" and Joe is added to Gus's list.
Similarly Joe gets notification that "oho, Gus is here" and Gus is added to Joe's list.
Options I can see
WiFi Direct (aka P2P). I gave it a shot, I'm a bit dissapointed. The problem is that it needs Android 4.0 or higher. Even worse, some devices seems to don't have required hardware. I launched
WiFiDirectDemo
from Android samples on Samsung Xperia Miro ST23i. Clicked on "search" and the only thing I got was a toast "enable WiFi P2P - in your settings". I clicked on everything in that settings, there is just normal WiFi and other stuff, no mention about Direct or P2P. I'm assuming that Xperio Miro just doesn't support WiFi Direct...Bluetooth (BT). I don't know, if I'm not too skeptical about it, but I see couple of problems. Short range. The biggest energy consumption. Maximum 7 peers connected at the same time (but maybe it's enough...). The big advantage is that a lot of devices support BT.
BT LE (low energy). Ok, it helps energy consumption problem. But, requires Android 4.3, so no.
WiFi connection with a server through internet + device geolocation. However, I don't how to do precise geolocation, here precise means < 100m. Is it possible?
Questions
Which option would you recommend? Maybe you can see another one, better?