XB Framework
Contents
Statement of Originality
I have read and understood the ECS Academic Integrity information and the University’s Academic Integrity Guidance for Students. I am aware that failure to act following the Regulations Governing Academic Integrity may lead to the imposition of penalties which, for the most serious cases, may include termination of the program.
I consent to the University copying and distributing any or all of my work in any form and using third parties (who may be based outside the EU/EEA) to verify whether my work contains plagiarized material and for quality assurance purposes.
I have acknowledged all sources and identified any content taken from elsewhere.
The use of SleepBetter XB for comparison and images throughout this report was approved by George Muresan, the developer of the application.
I have used the following libraries for my implementation of the project:
- Android Image Cropper by ArtherHub from GitHub [10]
- Graph View by jjoe64 from GitHub [11]
- Compact Calendar View by SundeepK from GitHub [12]
- Stitch-Android-SDK by mongodb from GitHub [13]
I did all the work myself and have not helped anyone else.
The material in the report is genuine, and I have included all my data and code.
I have not submitted any part of this work for another assessment.
My work did not involve human participants, their cells or data, or animals.
Keywords
Abbreviation | Description |
---|---|
Box | A collection of experiments |
XB | Experiment in a Box (sometimes just experiment) |
In5 | InBodied 5 |
MEECS | Move, Eat, Engage, Cogitate and Sleep |
GUI | Graphical User Interface |
JSON | Java Script Object Notation |
Data Structure | JSON Object (sometimes just structure) |
Data Array | An array of data structures |
IDE | Integrated Development Environment |
Abstract
Experiments in a Box are five-day long experiments that look at the effects of an activity on one of the five In5 health heuristics. The current process requires the development of a new application each time a new box is created.
This report explains the work done to unify both users and researchers into one application, dubbed the Experiment in a Box Framework, that can run the Experiments in a Box. It also looks to enables researchers to quickly launch novel experiments. This removes the entry barrier into this research domain and allows for a larger volume of research to be produced in this field.
This Framework was created as an Android application. Looking at the SleepBetter Experiment in a Box as a basis, the framework has implemented the same functionality by using free and available libraries for Android.
The Framework was successfully able to recreate the SleepBetter Experiment in a Box natively, however, some of the functionality is still missing. This opens many avenues of future work, including a database restructure, an iOS deployment, and developing a physical device to work alongside the application.
Introduction
In America, health tracking is a large phenomenon, with roughly 70% of Americans tracking one, or more, health indicators. Of those, only 20% use a device/application to track this data. Also, 46% of people who tracked an aspect of their health had tracking change “their overall approach to maintaining their health”. These statistics give a strong indication that the current climate in the western world is to try and be proactive about health to improve quality of life.
Beyond tracking, physical health indicators have a very real and direct link to the mental and overall wellbeing of a person. Over-sleeping, or under-sleeping, have both been linked to mental health issues and health risk behaviours amongst army veterans. Physical activity has been shown to have a small benefit on sleep, showing the intrinsic link between different aspects of health and each other.
Social interaction has been linked to higher self-esteem. A greater sense of community also helps to build mental fortitude. Also, meeting a minimum amount of time for physical activities has been shown to improve the quality of life of the population.
This information provides a strong rationale for research on personal health practices. Using the InBodied Interaction model, the body is described as 11 always-on, non-volitional systems. These systems (such as the respiratory, digestive, or epidermal systems) are always adapting to the surroundings, and each has an impact on one another. The use of this model is to enable researchers to base activities to target one, or several, systems to improve overall wellbeing. By impacting these systems, the participant's overall health and wellbeing will also be affected.
On top of this model, another more accessible model was introduced, the In5. This is a model that allows a methodology for interacting with the 11 non-volitional systems. The five points of interaction are Moving, Eating, Engaging, Cogitating, and Sleeping; or MEECS.
The ability to interact with these In5 attributes is enabled through an Experiment in a Box (hereby referred to as XB; explained in more depth in Section 2.1). An XB is a type of experiment, based around testing different actions and their effects on the In5. Due to the connected nature of In5 and the InBodied model, this will also have a systematic effect on the participant's overall wellbeing. It becomes a question, then, of what actions are taken within an XB affect the participant’s overall wellbeing. This is explored within the XB model, and this experiment-model of interaction has already been used with two research projects emerging from the University of Southampton.
In the two currently released research projects (SleepBetter XB and EatBetter XB), the researchers have implemented similar features and yet have had to develop an independent android (or iOS) application for each. This requires both time and resources for the researcher, as well as expertise with technology to oversee properly. As a result, it limits the accessibility to this kind of research. This prevents the focus of the project being purely the results of the experiments, but instead, the focus becomes on how to develop the application to properly test the experiment. This means the time of production for an XB is extremely long.
This report focuses on the implementation of a framework application for launching XBs, reducing the overall impact on researchers’ time and attention, and therefore allowing for more research to be produced in this field. The challenges this project will tackle are producing a low storage impact application, with a dynamically produced Graphical User Interface (GUI) that allows for the fast deployment for new XBs from experiments. It also explores how to implement the user side of the XB so that the frameworks can quickly attain new users, without requiring a new application launch. These involve answering the questions of what is important in an XB experience, and what is the information required for an XB to be launched.
Todo
- Update Readme purpose with relevant information
- Bug fix some of the progress code
- Update the commits
- Retrieve a list of commits for the appendix
- Set up a test script
- Improve Readme with example images etc
Directory Structure
Y3Proj
|-- LICENSE [General License agreement for anyone accessing the git repository]
|-- README.md [A readme for explaining the project for the git repository]
|-- XBFramework.iml [A project based dictionairy (including any gradle / project settings files)]
|-- app [The folder that contains all the code for the project]
| |-- app.iml [Another app based dictionairy (only for the code)]
| |-- build [An automatically generated build folder that holds temporary files during the build process]
| |-- build.gradle [An automatically generated build settings gradle file]
| |-- libs [An automatically generated library folder]
| |-- proguard-rules.pro [A project settings file]
| `-- src [The source code folder]
| |-- androidTest [An automatically generated test folder]
| |-- main [The main source code folder]
| | |-- AndroidManifest.xml [A file containing the manifest for all the pages and permissions in the applicaiton]
| | |-- ic_launcher-web.png [The raw .png for the app logo]
| | |-- java
| | | `-- com
| | | `-- yearthreeproject
| | | `-- xbframework [The actual java code (where all the dynamic features are written) anything with "Activity" is the pages code]
| | | |-- AboutActivity.java
| | | |-- BoxesActivity.java
| | | |-- ExperimentActivity.java
| | | |-- ExperimentSurveyCreatorActivity.java
| | | |-- LoginActivity.java
| | | |-- MainActivity.java
| | | |-- MyNotificationPublisher.java [A backend page used to push notifications even when the application is not running]
| | | |-- NewBoxActivity.java
| | | |-- ProgressActivity.java
| | | |-- ProjectMacros.java [A project defined library that holds functions used commonly throughout the project]
| | | |-- ShopActivity.java
| | | |-- SurveyResponseActivity.java
| | | `-- TestingActivity.java [A page only used in debugging phase, is not longer used in the final product]
| | `-- res [The resouce folder]
| | |-- drawable [Automatically generated XMLs for the launcher icon]
| | | |-- ic_action_right.xml
| | | `-- ic_launcher_background.xml
| | |-- drawable-anydpi [Automatically generated XMLs for the launcher icon for different formats]
| | |-- drawable-hdpi
| | |-- drawable-mdpi
| | |-- drawable-xhdpi
| | |-- drawable-xxhdpi
| | |-- layout [The layout folder for each different page, it is common practice to have an activity_ and content_ page file]
| | | |-- activity_about.xml
| | | |-- activity_boxes.xml
| | | |-- activity_experiment.xml
| | | |-- activity_experiment_survey_creator.xml
| | | |-- activity_login.xml
| | | |-- activity_main.xml
| | | |-- activity_new_box.xml
| | | |-- activity_progress.xml
| | | |-- activity_shop.xml
| | | |-- activity_survey_response.xml
| | | |-- activity_testing.xml [No longer used in final product]
| | | |-- content_about.xml
| | | |-- content_boxes.xml
| | | |-- content_experiment.xml
| | | |-- content_experiment_survey_creator.xml
| | | |-- content_login.xml
| | | |-- content_main.xml
| | | |-- content_new_box.xml
| | | |-- content_progress.xml
| | | |-- content_shop.xml
| | | |-- content_survey_response.xml
| | | `-- content_testing.xml [No longer used in final product]
| | |-- mipmap [Automatically generated .pngs for icon launcher]
| | | |-- ic_launcher.png
| | | |-- ic_launcher_foreground.png
| | | `-- ic_launcher_round.png
| | |-- mipmap
| | |-- raw [Raw files used for initialising different objects within the application]
| | | |-- box.json [The original local box data structure, no longer used]
| | | |-- box_outline.png [A two bit image of the logo for notifications]
| | | |-- local_user_data.json [The original local user data data structure, no longer used]
| | | |-- logo.png [The complete logo for the application]
| | | `-- shop.json [The shop data structure, used to generate the display in the shop page]
| | `-- values [Project wide files for static resource]
| | |-- arrays.xml [Contains a MEECS array, used for a spinner and data verification]
| | |-- colors.xml [The defined colour scheme for the project]
| | |-- strings.xml [A list of static strings to use, the standard way to code GUI in android]
| | `-- styles.xml [A description of the default look of GUI elements within the applicaiton]
| `-- test [An automatically generated folder]
|-- build.gradle [A project wide description of the libraries used and build settings]
|-- gradle [An automatically generated folder for project settings]
| `-- wrapper
| |-- gradle-wrapper.jar
| `-- gradle-wrapper.properties
|-- gradle.properties [More project settings]
|-- gradlew
|-- gradlew.bat
|-- local.properties
|-- settings.gradle
|-- planning [A folder containing all the supplementary planning documentation for this project]
| |-- Bill of Materials.xlsx
| |-- Daily progress.xlsx
| |-- Gantt.xlsx
| |-- Logbook.pdf [A scanned copy of the logbook entries used for this project]
| `-- Risk analysis.xlsx
|-- reports [A folder containing the two reports written for this project]
| |-- final [A folder contianing the final report]
| | |-- Project Report Body.docx
| | |-- Project Report Body.pdf
| | |-- Project Report.docx
| | `-- Project Report.pdf
| |-- project brief [A folder contianing the initial project brief]
| | `-- Project Brief.docx
| `-- progress [A folder containing the progress report]
| |-- Progress Report Body.docx
| |-- Progress Report.docx
| |-- Progress Report.pdf
| `-- ShorterReportBody.pdf
|-- Y3Proj File Structure.txt [This file]
`-- designs [A folder containing the design files relating to this project]
`-- saltshaker.png