## 3 Method
### Configurability  
The application should be easily configured by people who are not programmers of mobile applications. This facilitates the use of the application by researchers mainly interested in developing and experimenting with new machine learning techniques for human activity monitoring. When performing an activity or a set of activities, the subject has to specify both the kind of activity he/she will execute and where the smartphone and/or smartwatch will be placed during the execution of the activity. It has been demonstrated that the information regarding the position of the recording device (e.g., trouser pocket, wrist, or waist) is exploited in the machine learning literature to study the robustness of recognition methods to changes in device position [46]. The type of activity and device position are chosen from predefined lists and are not inserted by hand. This permits the user's interaction with the application to be simplified and, more importantly, the list of possible activities allowed during the recording session to be predefined. Thus, we have defined two sets of lists: one set contains the lists related to the positions, and the other set contains the lists related to the activities. The set related to positions includes two lists: one list contains the positions where the smartphone can be placed, and the other contains the positions where the smartwatch can be placed. The set related to activities also contains two lists, one containing a simple list of activities (e.g., walking, running, and sitting), and the other containing a list of predefined protocols. A protocol is an ordered sequence of activities and their durations, for example, running for 5 min, then jumping for 1 min, then standing for 2 min, and so on. Indeed, we identified two distinct ways in which the subject could carry out the activities: by selecting the activity to be performed from a list (i.e., operating a _free choice_ among the list of activities) or by following a protocol (i.e., a _predefined list_ of activities and durations). The former offers to the subject the possibility to choose which activities he/she wishes to carry out and for how long. On the contrary, the latter does not allow the subject to change the order in which the activities have to be carried out or their duration. The four configuration lists are turned into four corresponding JSON (JavaScript Object Notation) files: the smartphone positions' list, the smartwatch positions' list, the list of activities for the free choice mode, and the list of protocols in the predefined list mode. Listings 1 and 2 show examples for the smartphone and smartwatch positions' lists, respectively. Listing 3 shows an example list related to the free choice of activities, while Listing 4 shows an example list containing three protocols. Because the positions are related to the acquisition devices, we decided to assign the functionality regarding the choice of positions to the acquisition application. Because activities are used to correctly label signals, we decided to assign the functionality regarding the choice of the activity or the protocol to the labeling application. It follows that the JSON files related to positions are located in the smartphone running the acquisition application, while the JSON files related to the activities are located in the smartphone running the labeling application. ```
{ \"positions\":[ \"Bag\", \"Belt waist/hip (left-front)\", \"Belt waist/hip (center-front)\", \"Belt waist/hip (left-back)\", \"Belt waist/hip (center-back)\", \"Shirt pocket (left-front)\", \"Shirt pocket (right-front)\", \"Trouser pocket (left-front)\", \"Trouser pocket (right-front)\", \"Trouser pocket (left-back)\", \"Trouser pocket (right-back)\" ] ] }
```  
Listing 1: Example of the configuration file that includes the list of the smartphone positions. ```
{ \"positions\":[ \"Wrist (left)\", \"Wrist (right)\" ] }
```  
Listing 2: Example of the configuration file that includes the list of smartwatch positions.