基于接近度的设备通信或通知
在给定特定应用程序的情况下,如何根据邻近度促进设备之间的通信?目前可以吗?例如,如果我有一部 iPhone 或一部 iPhone 和一部基于 Android 的设备,我是否可以允许这些设备以某种方式相互传输一些信标,以便它们能够通过应用程序相互识别,或者至少知道它们需要此时与服务器对话并传输坐标?
How would one facilitate communication between devices based upon proximity given a particular app? Is it possible at this point? For example, if I have an iPhone or an iPhone and an Android based device, can I allow these devices to somehow transmit some beacon to each other so that they are able to recognize each other via an application or to at least know that they need to speak to a server at this point and transmit coordinates?
如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。
绑定邮箱获取回复消息
由于您还没有绑定你的真实邮箱,如果其他用户或者作者回复了您的评论,将不能在第一时间通知您!
发布评论
评论(2)
如果近距离要求是几厘米的数量级,那么 NFC(如 Garzanti 提到的)是一个不错的选择,(NFC 仍然是手机中采用的一项新技术,因此当前的安装基础有限)
如果近距离要求是几英尺的数量级,那么最好的选择是蓝牙,蓝牙在大量设备/手机中可用。蓝牙具有初始查询/发现过程,这是一个信标过程,用于发现附近要连接的附近设备,从而可以实现和检测设备的接近度。在 Android 上,这是完全支持的并且可以轻松实现。对于 iPhone 蓝牙公共 API 仅限于 Gamekit,Gamekit 使用内部自动机制来检测附近运行相同应用程序的设备。根据您的使用要求,也许可以使用 iPhone 蓝牙 GameKit API 来实现您的想法,
iPhone 还具有 MFi 程序,允许使用蓝牙来开发使用蓝牙的配件,并且可以更详细地访问 iPhone 蓝牙功能/api,要使用此程序,您需要部分 Apple MFi 程序才能访问。请参阅此处了解 MFi 详细信息:在此处输入链接说明
If the proximity requirement is of the order of few centi-meters then NFC (as mentioned by garzanti) is a good choice, (NFC is still a new technology being adopted in Mobile phones so current install base is limited)
If the proximity requirement is of the order of few feet , then the best choice is Bluetooth, Bluetooth is available in a large number of devices/phones. Bluetooth has the initial inquiry/discovery process which is a beaconing process to discover nearby devices in vicinity to connect to, with this is is possible to implement and detect proximity of devices. On android this is fully supported and can be implemented easily. With iPhone Bluetooth public APIs are limited to only Gamekit , Gamekit uses internal automatic mechanism to detect devices in proximity running the same applications. Depending on your usage requirements it may be possible to do what you are thinking using the iPhone Bluetooth GameKit Apis,
iPhone also has MFi program allowing use of Blueototh to develop accessories using Bluetooth and will have more detailed access into the iPhone Blueooth capabilities/apis , to use this you need to part of the Apple MFi program to get access. See here for MFi details: enter link description here
是的,有并且被称为 NFC - 近场通信,但 iPhone 尚不支持为了这。据推测,从 iPhone 5 开始,它们将支持 NFC。 Android 已经支持,但您仍然需要您的设备具有为此目的包含一个芯片。
您可以做的是使用蓝牙:首先配对您的设备,保持它们经过身份验证,然后使用 RSSI - 资源信号强度指示器(信号质量或衰减)。如果 RSSI 超过一定水平,则意味着它们就在附近,您可以传输信息。
Yes, there is and is called NFC - Near Field Communication, but iPhone doesn't have yet support for this. It is presumed that starting with iPhone 5 they will support NFC. Android has already support for it, but you still need that your device has a chip included for this purpose.
What you could do it is to use Bluetooth: pair your devices first, keep them authenticated and after work with the RSSI - Resource Signal Strength Indicator (signal quality or attenuation). If the RSSI goes over a certain level that means that they are nearby and you can transfer information.