結(jié)論:
(1)iOS 可以利用HealthKit讀取iOS手機(jī)中已經(jīng)記錄的記步數(shù)據(jù)仰禀;
(2)使用后臺(tái)GPS定位功能可以獲取每次GPS位置變更后的坐標(biāo)缤谎,使用坐標(biāo)數(shù)據(jù)渗鬼,可以畫(huà)出運(yùn)動(dòng)軌跡刹衫;
(3)結(jié)合GPS運(yùn)動(dòng)軌跡和記步步數(shù),可以統(tǒng)計(jì)出運(yùn)動(dòng)量口糕、運(yùn)動(dòng)路線缅阳;
===關(guān)于記步:===
iOS利用HealthKit框架從健康app中獲取步數(shù)信息
http://www.cnblogs.com/luoxiaofu/p/5259320.html
read stepCount from health app
這是一個(gè)簡(jiǎn)單的示例如何利用healthKit框架從健康app中獲取到步數(shù)信息
https://github.com/wl356485255/ReadStepCount
官方文檔:
The HealthKit Framework
HealthKit框架指南(The HealthKit Framework的中文版)
http://blog.csdn.net/pjk1129/article/details/41678099
Fit: Store and Retrieve HealthKit Data
https://developer.apple.com/library/ios/samplecode/Fit/Introduction/Intro.html
===關(guān)于后臺(tái)記錄GPS位置:===
Moves 是如何做到 iOS 后臺(tái)數(shù)據(jù)記錄的仰禀?
https://www.zhihu.com/question/21869458/answer/19572145
官方文檔:
參見(jiàn):#Tracking the User’s Location
The significant-change location service is highly recommended for apps that do not need high-precision location data. With this service, location updates are generated only when the user’s location changes significantly; thus, it is ideal for social apps or apps that provide the user with noncritical, location-relevant information. If the app is suspended when an update occurs, the system wakes it up in the background to handle the update. If the app starts this service and is then terminated, the system relaunches the app automatically when a new location becomes available. This service is available in iOS 4 and later, and it is available only on devices that contain a cellular radio.
簡(jiǎn)單的說(shuō)的烁,iOS 提供三種追蹤地理位置的模式:
<li>地理位置顯著改變服務(wù)(推薦)
<li>前臺(tái)地理位置服務(wù)
<li>后臺(tái)地理位置服務(wù)