Locationservice Indicator stays quot;onquot;(位置服务指示灯保持“开启状态)
问题描述
我创建了一个在 iPhone 上使用定位服务的小应用程序.一切都很好,除了有时,即使我明确杀死应用程序,信息栏中的小箭头也会保持活动状态.我对定位服务使用后台模式,因此实现了 appDelegate 方法 applicationWillResignActive、applicationDidEnterBackground、applicationWillEnterForeground 和 applicationDidBecomeActive,但是不要触摸位置服务(嗯 - 我需要它们在后台模式下).
I have a created a small app which uses location services on the iPhone. All works well, except the fact, that sometimes, the small arrow in the info-bar stays active even if I explicitly kill the app.
I use the background mode for locationservices, thus the appDelegate methods applicationWillResignActive, applicationDidEnterBackground, applicationWillEnterForeground and applicationDidBecomeActive are implemented but do not touch the location services (well - I need them in background mode).
在那个配置中 applicationWillTerminate 永远不会被调用;我在 dealloc 中将所有清理清理实现为 stopUpdatingLocation,因为我没有找到任何其他适合此的地方.但仍然 - 指示灯一直亮着.
In that configuration applicationWillTerminate is never called; I implemented all the cleanup cleanup as stopUpdatingLocation in dealloc, as I did not find any other place appropriate for this. But still - the indicator stays on.
有什么想法吗?
推荐答案
好的,问题解决了.指示灯将一直亮着,直到找到新位置.然后,如果其他一切都正确,则指示灯将关闭.
Ok, problem solved. The indicator will stay on until a new location is found. Then if everything else is correct, the indicator turns off.
这篇关于位置服务指示灯保持“开启"状态的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持编程学习网!
本文标题为:位置服务指示灯保持“开启"状态
基础教程推荐
- AdMob 广告未在模拟器中显示 2022-01-01
- 如何从 logcat 中删除旧数据? 2022-01-01
- NSString intValue 不能用于检索电话号码 2022-01-01
- libGDX 从精灵或纹理中获取像素颜色 2022-01-01
- Android:getLastKnownLocation(LocationManager.NETWORK_PROVIDER 2022-01-01
- Cocos2d iPhone 非矩形精灵触摸检测 2022-01-01
- 通过重定向链接在 Google Play 中打开应用 2022-01-01
- navigator.geolocation.getCurrentPosition 在 Android 浏览器上 2022-01-01
- iOS4 创建后台定时器 2022-01-01
- iPhone - 获取给定地点/时区的当前日期和时间并将其与同一地点的另一个日期/时间进行比较的正确方法 2022-01-01
