谷歌纵横iPhone版后台运行更新纵横坐标实现原理分析
来源:互联网 发布:剑灵龙女数据 编辑:程序博客网 时间:2024/04/28 01:05
转自:StackOverflow
Running application in background like google latitude
I'm working nowadays on an application that tracking the user location. I want this application to run even when it's not in the task list (double click on the home button doesn't show it). Like google latitude, the application is not running in background. I think that this document is talking about running application when user press on the home button:http://developer.apple.com/library/ios/#documentation/iphone/conceptual/iphoneosprogrammingguide/BackgroundExecution/BackgroundExecution.html
but what if user close this application by double click on the home button? I know that applications like google latitudes are still running in the background. so how can I do that?
2 Answers
Application is able to run again in background in case if it was registered for significant location change when launched last time. If Google latitude launch application back, than they use this flow:
- Application launch
- Check if device can provide significant location change notification (devices with cellular data may handle this kind of notification):
significantLocationChangeMonitoringAvailable
- Register for notification:
startMonitoringSignificantLocationChanges
- Quit app and as soon as your device will leave one cell tower to another, system would send notification and your application will be waked up.
There is a problem, no normal way to unregister from this notification. I think only by providing user an option to stop monitoring. I noticed this, by arrow on top right corner of status bar, which means what someone is using location service.
http://developer.apple.com/library/ios/#documentation/iphone/conceptual/iphoneosprogrammingguide/ManagingYourApplicationsFlow/ManagingYourApplicationsFlow.html%23//apple_ref/doc/uid/TP40007072-CH4-SW20
- 谷歌纵横iPhone版后台运行更新纵横坐标实现原理分析
- 纵横图
- 纵横三国外挂手记(1) 分析篇
- 纵横三国外挂手记(1) 分析篇
- android4.4 Camera 框架纵横方向分析
- 纵横三国外挂手记(3) 实现篇
- 纵横三国外挂手记(4) 实现篇
- 纵横三国外挂手记(3) 实现篇
- 纵横三国外挂手记(4) 实现篇
- 中兴 V880谷歌地图中谷歌纵横不能用的问题
- 软件史纵横
- 线性控制理论纵横
- 卢乐群:心手双畅意纵横
- 纵横图算法
- 纵横工作 2007.02.02
- VMR9AspectRatioMode 纵横比模式
- 概述纵横制电话交换机
- 中国科技纵横
- jsp中常用操作字符串的el表达式
- Android下Affinities和Task
- Android的Camera架构介绍
- 正确显示textarea中输入的回车和空格
- 《留住好员工》-读后感
- 谷歌纵横iPhone版后台运行更新纵横坐标实现原理分析
- 【OpenStack】OpenStack服务的启动
- 免费开源的权限管理配套代码生成器
- Sample Bowser promotions at MSDN main page
- 10种排序算法总结
- Linux操作系统定时任务系统 Cron 入门
- ios6 设备旋转以及获取设备方向
- The blog about Sample Browser_Serach,download,learn,share, and request code samples
- NSURL