iBeacon: Get advertisement package faster

别等时光非礼了梦想. 提交于 2019-12-31 05:33:08

问题


In my app I get the information of the beacons with CoreLocation and and the LocationManager. I've set the advertising interval of the beacons to 200ms. Is it possible to call the didRangeBeacons delegate method faster, so that i get the values of the advertising package according to the advertising interval of the beacon?


回答1:


No, you cannot alter the frequency of the didRangeBeacons:inRegion callback, which is 1 Hz regardless of the beacon advertising frequency.

You can get callbacks for each beacon advertisement (every 200 ms in your case) using CoreBluetooth APIs, but there are a couple of restrictions:

  1. It will not work with iBeacon transmissions as iOS blocks access to iBeacon advertisement data in CoreBluetooth. You can use AltBeacons, which are iBeacon compatible, and get the more frequent updates with those. You can buy beacons that send out both iBeacon and AltBeacon transmissions.

  2. It will only work in the foreground. You cannot get Bluetooth LE manufacturer advertisements in the background on iOS.

Full disclosure: I am Chief Engineer at Radius Networks which sponsors the open source AltBeacon standard.



来源:https://stackoverflow.com/questions/30373723/ibeacon-get-advertisement-package-faster

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