I can start and stop the recording steps with Sensor.TYPE_STEP_COUNTER, by registering and canceling the listening.
However, the actual value that is passed to my application through the object SensorEventdoes not reset to zero when the application is destroyed. If I close the application and restart it, or even if I recompile my application with updates, the counter will close where it left off.
If I run other applications that use the step counter sensor, they will independently count their steps and reset their counter.
Does the sensor have an application specific cache? What is the correct way to reset the sensor to zero?
source
share