当应用程序处于后台时,如何检测云台信标是否离开了特定区域?我尝试使用 didDepart 委托(delegate)方法,但它仅在 15 分钟后被调用,任何解决方案
最佳答案
这可能有点晚了,但仍然回答你的问题。以防万一有人不知道。实际上我们可以在后台模式下设置出发事件(didDepart)的值。这是一个例子:
NSMutableDictionary *options = [NSMutableDictionary new];
[options setObject:[NSNumber numberWithInt:FYXSightingOptionSignalStrengthWindowNone] forKey:FYXSightingOptionSignalStrengthWindowKey];
[options setObject:[NSNumber numberWithInt:5] forKey:FYXVisitOptionDepartureIntervalInSecondsKey];
[options setObject:[NSNumber numberWithInt:120] forKey:FYXVisitOptionBackgroundDepartureIntervalInSecondsKey];
[options setObject:[NSNumber numberWithInt:-60] forKey:FYXVisitOptionArrivalRSSIKey];
[options setObject:[NSNumber numberWithInt:-70] forKey:FYXVisitOptionDepartureRSSIKey];
[self.visitManager startWithOptions:options];
关于ios - 访问的背景云台检测(receivedSighting/didArrive/didDepart)?,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/24954927/