I am developing a Pedometer Android application to count number of steps taken and using the steps calculate the distance covered and calories burned. I have followed the tutorial Create a Simple Pedometer and Step Counter in Android and done exactly like it. It detects number of steps when the sensor detects motion.
But there are some problems with it:
I have checked some other applications from Play Store they do not do this kind of stuff.
I have searched but cannot find an appropriate solution or tutorial for it. Any help or suggestions. Thanks
It's your phone, of course. Thanks to built-in accelerometers, the phone can easily pull pedometer duty. All you need is an app that records the results (and, ideally, syncs them with other apps). Let's take a look at some of the best step-counter apps for Android.
Ranked highly by both iOS and Android users, the Pacer Pedometer & Step Tracker is our pick for best overall. This fitness app is a step counter, activity tracker, and social support all wrapped up in one easy-to-use program.
EasyFit Pedometer is, just like the others, a free pedometer for Android designed to help you get fitter by walking more. The app monitors your step count, distance, active time and the total of calories burned.
The problem here is that your implementation is not sophisticated enough: it only checks if there is a spike in the accelerometer data and assumes that the spike is coming from a step. It has no idea where the spike in acceleration is really coming from: it might as well come from you jumping or shaking the device in your hand.
How to make it more accurate then? Well, that is a really difficult question which has been topic for scientific papers for a really long time. Even the most sophisticated fitness trackers (which use machine learning, signal processing and other statistical methods) have difficulties to determine when the step is real and when it is just noice or user playing with the device.
Luckily Android does have it's own builtin step counter and step detector, which are more sophisticated than the class in yor example.
So unless you really want to learn signal processing and AI (which I highly recommended, although I don't know much about the data science of step detection), I would suggest to use builtin detector and counter.
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