Monday, January 13, 2014

Pedometer and Step Counter Mobile Apps : How does it work?

Share it Please
 Android-Iphone-Runtastic-Pedometer-and_Pedometer_2_0
Runtastic Pedometer(left) and Pedometer 2.0(right)

Mobile applications today with accelerometer sensor can work as a Pedometer or Step Counter for counting the number of steps you take while walking, running or step aerobics. In this blog I will discuss how it works and review of couple of apps on Android and Iphone.

How accurate is the count: It is close to the actual count but need to be started and stopped at right time.e.g. If you start the app before starting your jogging and end it after you complete it, then the count will be near to the actual count. But if you start the app, and talk on phone or play some game on it, then chances are that this activity will increase the step count.One obvious question is that can these applications record all the steps taken by a person with the app on the phone in a day? The answer is, It can provide a rough idea of it but not accurate numbers. Some of the tasks like picking up the phone ,putting it down, sliding it , holding it for clicking picture etc. may also increase the step count.

Where you need to keep your phone: You can keep it in pocket,in jacket, hold it in hand or keep it in purse. As long as it is directly or indirectly attached to your body during motion it will give the number of steps.

Does it use GPS: These applications work without GPS also, So we can assume that it does not need GPS for step counting. But if the application has other features like showing the map of the track you followed while jogging, then GPS will be required.

Affect on Battery: Drains the battery if used for a long time however Google claims that Android 4.4 accelerometer sensor works on low power mode.

How it works?: These applications work with the phones which have the Accelerometer sensor built in it. While running, this application will monitor the change in accelerometer and based on it will conclude if the step is taken. It can provide the information about the angle at which you are holding the device, direction , speed at which it is moved and the gravity. Accelerometer provides the values whenever they are changed along with the Time at which the event occurred. Application stores these values in the database and look for a pattern.

An accelerometer will provide three values x-axis value, y-axis value and z-axis value. As the person starts taking the first step, x-axis value will increase at a rate depending upon the force at which the person starts to move, y-axis which will tell the relative change in the height of the device along with the force will show an increase in value as while taking the step person will rise from the ground and then it will decrease till the step touches the ground. Based on this kind of pattern match, Step event is detected. Same kind of concept is used in wave to answer feature provided in phones.

Android Kit Kat 4.4 Step Detector and Step Counter: Android has introduced the low power step detector feature in the platform itself. Developers can use this feature and don’t have to write own code/algorithm for step detection. Apart from this a Step Counter is also introduced by the Android in Kit-Kat which will maintain the count of steps taken after the sensor is registered for listening of step events. Here are some key steps for implementation for using the Step detector
  1. Extend the activity to implement SensorEventListener()
  2. Get the Sensor Manager using getSystemService()
  3. Check for the availability of Sensor and get the sensor using getDefaultSensor() functionality of Sensor Manager specifying the Sensor type
  4. Register for the listener using the registerListener() functionality of Sensor Manager and providing the frequency at which you need the event notification.
  5. Implement the logic for displaying or using the Step event in onSensorChanged() function called by the system.Check for the time-stamp for duplicate events.
Review of Runtastic Pedometer vs Pedometer 2.0: Both these apps are available on the Google Play store and have a free version with limitations but good enough to try and make a decision. Both these applications provided step counts with reasonable accuracy. Pedometer 2.0 is quite sensitive and was increasing the Step count even with a slight movement of phone after the activity was finished and it also asked to specify whether the activity is walking or running manually whereas Runtastic Pedometer did not ask for the same. Pedometer 2.0 has better charts then the Runtastic Pedometer but overall Runtastic Pedometer available on both Apple App Store and Google Play is more stable and accurate.

No comments:

About Us

I, Bimal K. Chawla, Working in Android technology as Associate Software Engineer in Mohali, Punjab, India. I likes to play and watch cricket, to Walk...Read More

Blogroll

Advertisment

About