Time for action – maintaining step history with the step detector sensor
The step counter sensor works well when we have to deal with the total number of steps taken by the user since the last reboot (power on) of the phone. It doesn't cater to our purpose when we have to maintain the history of each and every step taken by the user. The step counter sensor may combine some steps and process them together and will only update with an aggregated count instead of reporting the individual step detail. For such cases, the step detector sensor is the right choice. In our example, we will be using the step detector sensor to store the details of each step taken by the user, and we will show the total number of steps for each day since the application ...
Get Android Sensor Programming By Example now with the O’Reilly learning platform.
O’Reilly members experience books, live events, courses curated by job role, and more from O’Reilly and nearly 200 top publishers.