xcode - ios运动健身类应用,我跑步时手机锁屏揣兜里,这时怎么拿到运动数据,比如跑过的地点?
大家讲道理
大家讲道理 2017-04-17 17:48:30
0
1
386

1.app在前台时 可以一边定位一边绘制运动轨迹。
2.那锁屏之后呢,我跑过的点还保存吗,保存在哪,怎么获得这些数据?

大家讲道理
大家讲道理

光阴似箭催人老,日月如移越少年。

reply all(1)
大家讲道理

There are two types of app obtaining positioning in the background. One is to obtain positioning in the ordinary background, and the other is to obtain positioning in the continuous background.
Ordinary background is used to obtain positioning. After 8.0, requestAlwaysAuthorization is required. How can he request like this?
Normally, it is just like your usual app. After entering the background, didUpdateLocations can still get the data for a while. How long will it take? About 10 minutes. After 10 minutes, you won’t be able to get it.
Continue to get the location in the background, and The common difference is that you need to check Location update in Background Modes. Then as long as your app is not closed, your didUpdateLocations method will always get the location.
Continue to get the background location app when it is put on the shelf, unless you have Tell him for a very obvious reason that I must obtain continuous positioning in the background, otherwise I will reject you. In addition, I will also ask you to add the sentence "Continued use of GPS running in the background can dramatically decrease battery life."# in your app introduction. 🎜🎜#Don’t ask me why I know it so clearly, because I was denied this permission several times in the past few weeks. . . .

Latest Downloads
More>
Web Effects
Website Source Code
Website Materials
Front End Template
About us Disclaimer Sitemap
php.cn:Public welfare online PHP training,Help PHP learners grow quickly!