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.
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.
I found an example for you, hope it helps in someway, the sensor explanation on the API page is pretty straight forward too..
API Page: 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
Official example
In Android SDK 23 under samples/android-23/sensors/BatchStepSensor
, run with:
./gradlew clean
./gradlew assembleDebug
./gradlew installDebug
Then turn on the app, enable one of the step sensors, and walk around with your phone to see the counter increment.
Source at: https://github.com/googlesamples/android-BatchStepSensor
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With