查找您位置附近的用户
我正在寻找一种方法来查找您所在位置特定半径内的用户。 我需要这个的原因是因为我想知道一个地区有多少人。 我发现的一种可能的方法是激活蓝牙并查找周围的活动设备。
我想知道是否有其他解决方案、API、可能性可以做到这一点。
I'm looking for a way to find users in a certain radius of your position.
The reason I need this is because I want to know how many people there are in an area.
A possible way I found is to activate the bluetooth and find active devices around.
I want to know if there are other solutions, API, possibilities to do this.
如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。
绑定邮箱获取回复消息
由于您还没有绑定你的真实邮箱,如果其他用户或者作者回复了您的评论,将不能在第一时间通知您!
发布评论
评论(2)
有人谈论点对点 wifi 连接,但不确定状态。会给你比蓝牙更远的距离。还有一个库
Android 可以做点对点广告吗-hoc网络?
还有一个来自高通的库
https://developer.qualcomm.com/develop/mobile-technologies/peer-peer-alljoyn/faq
There was talk of peer to peer wifi connections, but not sure the status. Would give you some more distance than bluetooth. There is also a library
Can Android do peer-to-peer ad-hoc networking?
there is also a library from qualcomm
https://developer.qualcomm.com/develop/mobile-technologies/peer-peer-alljoyn/faq
您最好的选择可能是搜索蓝牙设备。
大多数手机都具有 2 类蓝牙无线电,其额定范围通常为 10 m,但它对环境的影响非常大(例如,您会注意到即使通过少量的水进行传输也会出现严重的数据包丢失,例如在另一方面,如果两个设备之间只有空气,无线电设备可以检测到 100 m 之外的设备。
这样做的主要问题是您必须要求蓝牙处于活动状态,而许多用户默认情况下可能没有蓝牙。
Your best bet would probably be with searching for bluetooth devices.
Most phones have a class 2 bluetooth radio which is generally rated at a range of 10 m, but it can very greatly on the environment (for example, you would notice significant packet loss transmitting through even a small amount of water, such as in a person.) On the other side of the coin, the radio could detect devices up to 100 m away if there were nothing but air between the two devices.
The main problem with this is that you would have to require bluetooth to be active, which a lot of users might not have by default.