转自:StackOverflow

Running application in background like google latitude

up vote 1 down vote favorite

2

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?

iphone  objective-c  ios  ios4  ios-4.2
share | improve this question
edited  Aug 14 '11 at 19:25
asked  Aug 14 '11 at 19:18
Elad
159 1 15

   

2 Answers

active oldest votes

up vote 1 down vote accepted

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:

  1. Application launch
  2. Check if device can provide significant location change notification (devices with cellular data may handle this kind of notification): significantLocationChangeMonitoringAvailable
  3. Register for notification: startMonitoringSignificantLocationChanges
  4. 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.

share | improve this answer
原文:http://stackoverflow.com/questions/7059107/running-application-in-background-like-google-latitude
Apple官方文档: Background Execution and Multitasking
http://developer.apple.com/library/ios/#documentation/iphone/conceptual/iphoneosprogrammingguide/ManagingYourApplicationsFlow/ManagingYourApplicationsFlow.html%23//apple_ref/doc/uid/TP40007072-CH4-SW20

谷歌纵横iPhone版后台运行更新纵横坐标实现原理分析相关推荐

  1. iPhone版QQv4.7更新下载:更快更流畅

    iPhone版的QQ就推送了4.7版的更新,从4.6到4.7,这次QQ团队为iPhone QQ增加了多项功能,主要增强了文件互传的便利性和多人通话功能,另外,QQ也整合了人脉功能,向职场社交靠拢,更重 ...

  2. MT4跟单系统的运行环境、模式与原理分析

    1.跟单系统属于线上系统,脱离网络就无法跟单. 2.跟单系统属于资源消耗性系统,每个帐号都需要与服务器保持长连接(24小时保持连接状态),需要实时接收与传递交易信号或信息数据. 因此每个跟单帐号和喊单 ...

  3. ios 后台唤醒应用_iOS 后台运行机制

    很多使用iphone的孩纸,可能并不了解iphone的后台运行机制.今天转载一篇网友的文章,来扫盲一下. 标注来源:http://blog.csdn.net/enuola/article/detail ...

  4. Android 程序后台运行和锁屏运行

    Android 后台服务保活 需求 方案 推广一下我的个人博客小站: Z同学 期待大家的围观 需求 1.在华为手机中应用切换到后台后,打开其他app.需要我的应用后台仍然能够访问http,传输数据. ...

  5. unity android 在后台运行_Android 11“精简版”正式发布,低端机也可以流畅运行

    虽然Android依然是全世界使用最多的手机操作系统,但与iOS相比,由于Android的自身特性在长时间使用后会产生很多垃圾文件,久而久之手机就会变得越来越卡顿,对于一款旗舰机而言,这种卡顿可能会来 ...

  6. 谷歌发布人体图像分割工具BodyPix 2.0,支持多人识别,可在iPhone上流畅运行

    晓查 发自 凹非寺  量子位 报道 | 公众号 QbitAI 今天,Google官方推出了使用TensorFlow.js的人体图像分割工具BodyPix 2.0,对该工具进行了一次重大升级,加入多人支 ...

  7. 最新ChatGPT商业运营版网站源码+支持AI绘画+支持用户会员套餐+邀请分佣功能+支持后台一键更新+网站后台管理+永久更新!

    最新ChatGPT商业运营版网站源码+支持AI绘画+支持用户会员套餐+邀请分佣功能+支持后台一键更新+网站后台管理+永久更新! AI付费创作系统: 如果后续程序有新版,直接在后台一键更新即可! 程序完 ...

  8. 事无巨细的Steam饥荒联机云服搭建教程(阿里云;CentOS7.7)【更新至后台运行】

    关于饥荒的云服搭建网上已经有很多文章了,还有脚本和exe,真正的一键开服. 这篇文章是写给和我一样对服务器和linux系统的了解不足,但对安全性要求很高, 爱折腾,想要自己全盘管理自己的服务器的道友们 ...

  9. Redis的 Window 版安装(详细配置环境,后台运行)

    Window 下安装 下载地址:: https://github.com/MSOpenTech/redis/releases https://github.com/microsoftarchive/r ...

最新文章

  1. helm快速部署一个nginx应用并更改service类型为NodePort、自定义Chart的发布
  2. 方立勋_30天掌握JavaWeb_数据库表设计
  3. python测试c语言代码_numpy C语言源代码调试(一)
  4. C#面试题(.net开发人员必备)
  5. 打车应用上马快递业务靠谱吗?
  6. canvas学习笔记-贝塞尔曲线
  7. Ubuntu配置FTP服务(匿名登录)
  8. Oracle 拼接结果过长,ora-01489 字符串连接的结果过长 解决方案
  9. 软件测试开发高频面试题及参考答案(适用校招)
  10. Python基础班就业免费视频教程分享
  11. 格式工厂 wav 比特率_新星WMA/WAV音频格式转换器转换音频格式的方法
  12. 游戏模型与影视模型在制作上的区别,以及分别都用什么三维软件最多
  13. windows不支持scp指令解决方案
  14. 计算机视觉之--使用opencv生成简笔画小视频
  15. Oracle EBS 常用表 查询语句
  16. C/C++:计算N的N次方的个位数(火眼金睛找规律,解决此题数据问题)
  17. 3D电影、游戏里的角色是怎么制作的?
  18. 用户输入一个整数,求出它的各个位数,并求各位数之和
  19. iOS-Cannot find interface declaration for 'XX', superclass of 'XX'
  20. [Python基础]列表List

热门文章

  1. jsp提供了的9个内置对象
  2. 普中51仿真器怎么下载操作
  3. 全国计算机二级考试ACCESS入门教程
  4. switch语句如何用字符串?
  5. win10专业版访问共享文件夹错误代码0x80004005解决办法
  6. 7-97 判断上三角矩阵(带注释)
  7. GOOGLE无法访问的解决
  8. c语言高精度计算n的阶乘,高精度计算n阶乘的c语言源代码和解释
  9. 三维建筑动画制作流程
  10. java jxl label_jxl.write.label 方法