Step Detector and Step Counter Sensors on Android

Android KitKat has added a few more hardware sensors to it’s API list. Step Sensors are one of them, which looks very promising. Although, not a lot of phones yet have these Step Sensors, in the future, this would gradually become a standard I think. Currently, Nexus 5 has them.

Let’s see how we can interact with these sensors. Basically, there are 2 sensors.

Step Counter: This keeps a count of the number of steps that you have taken. The counter is only reset when you re-boot the device, else, for every step you take (or the phone thinks you took, you counts up).

Step Detector: This sensor just detects when you take a step. That’s it.

The example project shows you how to initialize and setup the SensorManager and respond to events from the Sensors.