Android和iPhone之间的距离 [英] distance between android and iphone

查看:266
本文介绍了Android和iPhone之间的距离的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我要寻找一种方式来传输数据时,两部手机都在附近。这必须是跨平台​​的,所以我不能使用NFC或iBeacon。我打算使用allJoyn发送信息。我只想将数据发送给其他人,在相隔数英尺我说。

I am looking for a way to transmit data when two phones are close by. This needs to be cross platform so I cannot use NFC or iBeacon. I plan on using allJoyn to send information. I would only like to send data to others that are within a few feet of me.

有没有什么办法,我能得到距离对其他手机精确的读数?或者,我可以得到一个主设备,可以放置在房间的准确距离是多少?

Is there any way that I could get an accurate reading of distance on other phones? Or can I get an accurate distance on a master device that could be placed in the room?

推荐答案

所以,我发现做到这一点的最好方法是使用加速度计来告诉当两个设备磕碰然后我得到的最接近设备的蓝牙信号强度,如果落入一定的值,那么他们是感人。

So the best way that I found to do this is to use the accelerometer to tell when two devices bump then I get the bluetooth signal strength of the nearest device, if that falls into a certain value then they are touching.

这篇关于Android和iPhone之间的距离的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆