Implementation of the mHealth App

SL Sungchul Lee
RW Ryan M Walker
YK Yoohwan Kim
HL Hyunhwa Lee
request Request a Protocol
ask Ask a question
Favorite

The mHealth app was developed to measure and record rotational data in real time by using an Android smartphone’s motion sensors. Figures 1--77 show the mHealth app in use to gather the sensor data. The app was programmed for Android mobile platforms with software development kits greater than 21 using Android Studio [19]. This research used the app on the default settings of the Samsung Galaxy S8 [20] with Android 7.0 mobile operating system. The code is written in Java using the Android application programming interface [21]. This app uses the Android sensor framework to access sensor data as part of the hardware package that consists of 3 classes and 1 interface. The classes are SensorManager, Sensor, and SensorEvent. SensorManager accesses the device’s sensors, Sensor obtains the list of available sensors, and SensorEvent creates the sensor object that includes the raw sensor data. The interface, SensorEventListener, receives notifications when a sensor value or accuracy changes [22].

Main fragment of the mobile health app.

Sensor data graph.

Sensors used in this app include the gyroscope, accelerometer, gravity, and magnetic sensors. The gravity and magnetic sensors are used to calculate the rotation matrix using the getRotationMatrix method, which belongs to the SensorManager class [23]. Raw sensor data visualizations are created using the Androidplot library [24]. The collected sensor data are stored in an SQLite database [25]. Two comma-separated value files are created from the saved participant information and sensor values. These files are saved on the device for further data analysis. Figure 1 shows the main fragment in the mHealth app. In the main fragment, the mHealth obtains the participant’s status such as any pain (back, leg, head, etc), any medication in the last 3 days, any problems walking, concussion experience, gender, race/ethnicity, height, and weight. After touching the “SUBMIT” button in the main fragment, the mHealth app proceeds to the fragment shown in Figure 2. After selecting the “START” button (Figure 2), mHealth changes the fragment to Stop Fragment, as shown in Figure 3. Then, the participant walks straight forward for 2-3 minutes and then returns to the starting location. After the participant returns to the starting location, the participant touches the “STOP” button, as shown in Figure 3. The walking data are recorded between the time of selecting the “START” button (Figure 2) and the time of selecting the “STOP” button (Figure 3). After touching the “STOP” button, an administrator opens the widget in the mHealth app (Figure 4) to save the data by swiping from left to right on the smartphone screen. The “Admin” button (Figure 4) is used to save the recorded walking data. When selecting the “Admin” option (Figure 4), the mHealth app moves to the Save Fragment. There is 1 checkbox (Figure 5) to confirm whether the walking data are valid or not. The checkbox is for indicating whether the test was invalidated by an interruption or an unexpected event during recording. By selecting the “SAVE” button (Figure 4), the data are saved to an SQLite database and a comma-separated value file on the local disk. The mHealth app has several functions to analyze the raw data in real time. By selecting functions such as “Metrics,” “Accelerometer,” and “Gyroscope” (Figure 4), the mHealth app displays the current status of the raw data, as shown in Figure 6 and Figure 7. Figure 6 shows the current accelerometer, gyroscope, and rotation matrix in real time. Figure 7 shows the graph of the sensor data.

Start fragment of the mobile health app.

Stop fragment of the mobile health app.

Menu widget.

Confirm walk test.

Sensor data matrix.

Do you have any questions about this protocol?

Post your question to gather feedback from the community. We will also invite the authors of this article to respond.

0/150

tip Tips for asking effective questions

+ Description

Write a detailed description. Include all information that will help others answer your question including experimental processes, conditions, and relevant images.

post Post a Question
0 Q&A