Use similar technology as CMMotionActivity on older iPhones

孤者浪人 提交于 2019-12-26 00:06:32

问题


I'm looking to use the CMMotionActivity for iPhone 5s's, but also want to be able to use similar functionality on older iPhone's, is this possible?

Could I create a less accurate alternative maybe, by tracking GPS and not using the M7 chip? Any advice/tutorials/sample code?


回答1:


You can create your own algorithm which will utilize accelerometer data and estimate number of steps taken. Its not as accurate and its not a good idea to have 2 separate logic in the same app.

In case, you want to give it a try, check this answer..How to count steps using an Accelerometer?



来源:https://stackoverflow.com/questions/19337307/use-similar-technology-as-cmmotionactivity-on-older-iphones

易学教程内所有资源均来自网络或用户发布的内容,如有违反法律规定的内容欢迎反馈
该文章没有解决你所遇到的问题?点击提问,说说你的问题,让更多的人一起探讨吧!