Loading the data collector

First, grab the source code of MyRunsDataCollector from GitHub. Once Android Studio is installed, choose the Open an existing Android Studio project option, as shown in the following screenshot, and select the MyRunsDataCollector folder. This will import the project to Android Studio:

After the project import is completed, you should be able to see the project file structure, as shown in the following screenshot. The collector consists of CollectorActivity.java, Globals.java, and SensorsService.java. The project also shows FFT.java implementing low-level signal processing:

The main myrunscollector package contains the following classes:

  • Globals.java: This defines global constants, such as activity labels and IDs, and data filenames.
  • CollectorActivity.java: This implements user interface actions, that is, what happens when a specific button is pressed.
  • SensorsService.java: This implements a service that collects data, calculates the feature vector, as we will discuss in the following sections, and stores the data into a file on the phone.

The next question that we will address is how to design features.

..................Content has been hidden....................

You can't read the all page of ebook, please click here login for view all page.
Reset
3.149.28.126