Transmitting data using iBeacon or similar technology [closed]

只谈情不闲聊 提交于 2019-12-02 04:56:07

Either approach can work, but a web service has real advantages:

  1. Connecting to a bluetooth service requires user permission, a web service does not.

  2. If your app is not running in the foreground, the iBeacon monitoring API can make it launch into the background for about 5 seconds. During this time you can call a web service. But background support for bluetooth connections is limited in iOS.

  3. If the bluetooth connection is directly between devices, you have to figure out which device to make the central and which to make the peripheral. This negotiation is complex.

  4. If the bluetooth connection is between each device and the beacon, then you can't use standard iBeacons -- you have to build custom ones that support additional connectable bluetooth services.

The main disadvantage of a web service approach is that it won't work when you don't have network connectivity. You have to decide if you can live with that disadvantage.

易学教程内所有资源均来自网络或用户发布的内容,如有违反法律规定的内容欢迎反馈
该文章没有解决你所遇到的问题?点击提问,说说你的问题,让更多的人一起探讨吧!