Time for action – type of step (walking, jogging, and running) detection using the accelerometer sensor

This section is dedicated to the implementation of the type of step detection algorithm discussed in the previous section. Our implementation for the algorithm will consist of four major components of android: first is android service, which will stay in the background, second is a set of two threads using the  ScheduledExecutorService, and third is the activity to show the pedometer application data. The last component is the SQLite database to store the steps' information. The following is the high-level class diagram of the application; we will discuss each class in detail in their own sections. Now, let's explore the first component in detail: ...

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.