Android 4.4 步数检测器和计数器

声明:本页面是StackOverFlow热门问题的中英对照翻译,遵循CC BY-SA 4.0协议,如果您需要使用它,必须同样遵循CC BY-SA许可,注明原文地址和作者信息,同时你必须将它归于原作者(不是我):StackOverFlow 原文地址: http://stackoverflow.com/questions/20367402/
Warning: these are provided under cc-by-sa 4.0 license. You are free to use/share it, But you must attribute it to the original authors (not me): StackOverFlow

提示:将鼠标放在中文语句上可以显示对应的英文。显示中英文
时间:2020-08-20 02:44:56  来源:igfitidea点击:

Android 4.4 Step Detector and Counter

androidandroid-4.4-kitkat

提问by kalehv

Is there any documentation around Android 4.4 KitKat's (well specifically Nexus 5 for now) step detector and counter APIs? I tried to search a lot but did not find anything.

是否有关于 Android 4.4 KitKat(现在特别是 Nexus 5)步检测器和计数器 API 的文档?我试图搜索很多,但没有找到任何东西。

I am planning to try my hands on these new concepts and want to use the API but there's nothing around it on the Internet.

我计划尝试使用这些新概念并想使用 API,但 Internet 上没有任何相关内容。

回答by Rejinderi

I found an example for you, hope it helps in someway, the sensor explanation on the API page is pretty straight forward too..

我为您找到了一个示例,希望对您有所帮助,API 页面上的传感器解释也非常简单明了。

API Page: http://developer.android.com/about/versions/android-4.4.html#UserInput

API 页面:http: //developer.android.com/about/versions/android-4.4.html#UserInput

Blog Post: http://theelfismike.wordpress.com/2013/11/10/android-4-4-kitkat-step-detector-code/Github Project referenced in the blog: https://github.com/theelfismike/android-step-counter

博文:http: //theelfismike.wordpress.com/2013/11/10/android-4-4-kitkat-step-detector-code/ 博客中引用的Github项目:https: //github.com/theelfismike/安卓计步器