有没有关于Android4.4KitKat(目前特别是Nexus 5)、步骤检测器和计数器API的文档?我试着找了很多东西,但什么也没找到。
我计划尝试这些新的概念,并想使用API,但它周围没有任何东西在互联网上。
发布于 2013-12-04 05:29:20
我给你找了个例子,希望它能在某种程度上有所帮助,API页面上的传感器解释也很直接。
API页面:http://developer.android.com/about/versions/android-4.4.html#UserInput
博客文章:在博客:http://theelfismike.wordpress.com/2013/11/10/android-4-4-kitkat-step-detector-code/:https://github.com/theelfismike/android-step-counter中引用的Github项目
发布于 2016-01-25 23:03:55
官方示例
在samples/android-23/sensors/BatchStepSensor
下的Android 23中,运行以下命令:
./gradlew clean
./gradlew assembleDebug
./gradlew installDebug
然后打开应用程序,启用一个步长感应器,然后带着手机四处走动,查看计数器的增量。
资料来源:https://github.com/googlesamples/android-BatchStepSensor
https://stackoverflow.com/questions/20367402
复制相似问题