可以在后台运行iPhone的加速度计吗? [英] Is it possible to run accelerometer of iPhone in background?

查看:154
本文介绍了可以在后台运行iPhone的加速度计吗?的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我想使用iPhone的加速度计来获取加速度计值的日志文件(可能是24小时)。在其他应用程序运行时,是否可以让加速度计在后台运行?

I want to use accelerometer of iPhone to get the log file of accelerometer value (maybe for 24 hours). Is it possible to let accelerometer runs in background while other applications are running?

推荐答案

如果您的应用是由于其他原因允许在后台运行。请参阅Core Motion API的 startAccelerometerUpdatesToQueue:withHandler:方法 here

You can do it now, if your app is allowed to run in the background for other reasons. See the Core Motion API's startAccelerometerUpdatesToQueue:withHandler: method here.

这篇关于可以在后台运行iPhone的加速度计吗?的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆