0

我需要对 iBeacon 技术的支持。在我们的例子中,我想要一个连续扫描(测距)iBeacons 的功能,因为我们的应用程序是在前台或后台。我们知道使用 CLLocationManager 标准更新位置方法是可能的。但是我们不想使用标准的位置更新(因为我们不想冒电池耗尽的风险)。是否有任何其他选项可以在不使用 CLLocationManager 的情况下启动 CLBeaconRegion 的连续测距?

4

2 回答 2

0

The only way you can detect iBeacon transmissions on iOS is with CoreLocation, and you are correct that constant ranging does drain the battery significantly.

In theory you could use CoreBluetooth to detect other beacon types like AltBeacon (reading iBeacon advertisement details are blocked by CoreBluetooth), but battery usage would still be similar.

The standard way to save battery in the background is to use CoreLocation beacon monitoring APIs, which are easier on the battery. Then when a beacon is detected by these monitoring APIs, you can start ranging, even if your app is in the background.

For more info on extending background ranging time, see here: http://developer.radiusnetworks.com/2014/11/13/extending-background-ranging-on-ios.html

于 2014-12-24T07:14:39.967 回答
0

我正在使用 Estimote Beacons 并且有可用的委托方法或 Estimate SDK(ESTBeaconManager 类)“ https://github.com/Estimote/iOS-SDK ”,每当信标进入范围或超出范围时,下面所说的委托方法将在内部调用并帮助我们减少电池消耗。我们可以将接近检查放在 didEnterRegion 方法中:

- (void)beaconManager:(ESTBeaconManager *)manager didEnterRegion:(ESTBeaconRegion *)region{}
- (void)beaconManager:(ESTBeaconManager *)manager didExitRegion:(ESTBeaconRegion *)region{}
- (void)beaconConnectionDidSucceeded:(ESTBeacon*)beacon{}
- (void)beaconConnectionDidFail:(ESTBeacon*)beacon withError:(NSError*)error{}
- (void)beaconManager:(ESTBeaconManager *)manager  didRangeBeacons:(NSArray *)beacons inRegion:(ESTBeaconRegion *)region{}
于 2014-12-24T06:27:21.697 回答