Runtime error to make pedometer

Congratulations, the app looks nice although it is not working exactly like you would like.

The results possible with the Pedometer component depend to large extent on how good the accelerometer hardware is in your Android and how you adjust the StrideLength and how you keep the device from sleeping. I expect you will get better results when you walk a greater distance than 30 Steps. The Step sample size is very small. More steps would tend to smooth out the step issues. A better test would be to walk a known distance; possibly one kilometer. Walk that distance and compare your Distance(KM); how close to 1 km do you get?

Before MIT provided the Pedometer component (see Nishyanth's post), I made a pedometer using the Accelerometer. It is possible to adjust the sensitivity of the Accelerometer but not the Pedometer. As I recall, I got better results the Accelerometer and writing my on calclation using the Accelerometer than when using Pedometer.

A different way to measure distance walked would be to use the LocationSensor (gps) to keep track of how far you walk. If you know the distance walked and your stride length you can calculate the approximate number of steps.

Someone has created a free extension to make a Pedometer [FREE] Pedometer with Foreground Service . The extension might work better than the Pedometer component. I have not tried it.

Keep on experimenting. Let us know if you can improve your Walkie app.

2 Likes