https://github.com/stevelyall/project-ernie-app
The ERA mobile app is downloaded by participants participating in the ERA project studies, and collects demographic information and survey responses from participants and sends them to the server. It is a hybrid mobile application built using the Ionic Framework (http://ionicframework.com/), relying on HTML5, CSS3, and AngularJS. To install the framework and the required components to build the application for either platform, visit the Getting Started page on the Ionic site: http://ionicframework.com/getting-started/
Currently, ERA acts as a standalone application which does not send participants' data to the server until permission has been granted by the principal investigator. This functionality can be re-enabled in afterSurveyController.js. The purpose of the beta version being to test the application's UI on various devices and get feedback from users, scheduled surveys and notifications have not yet been implemented. At present, users are taken through the process of setting up the application and may complete a practice survey as many times as they wish. Local notifications have been implemented, and the background service to manage surveys is in progress.
At present, the survey question text, scale and anchor points are static, and are stored locally in the application. These items may be modified by editing questions.json and rebuilding.
As the user progresses through the survey, responses are stored in local storage. After the survey has been completed, the participant's demographic information and responses are stored in a JSON string and sent to the server using the HTTP POST method.
-
ngCordova - extensions for AngularJS for Cordova. http://ngcordova.com/
-
Ionic Keyboard Plugin - allows for easier control of device keyboard. https://github.com/driftyco/ionic-plugin-keyboard
-
Apache Cordova Device Plugin - used to access UUID for the device, which is used as a substitute for a researcher-provided participant id. https://github.com/apache/cordova-plugin-device
-
Email Composer with Attachments Plugin - used to compose a blank email message for beta testers to send feedback. https://github.com/jcjee/email-composer
-
Apache Cordova Local Notifications - for displaying local notifications on iOS and Android devices. https://github.com/katzer/cordova-plugin-local-notifications
- Install Ionic and its dependencies: http://ionicframework.com/getting-started/
- If you haven't already, clone the ERA repository: https://github.com/stevelyall/project-ernie-app.git
- Change into the project-ernie-app project root and run:
npm install
This ensures you have other required packages and those required for testing.
- Add the android and iOS platforms to the project:
ionic platform add android
ionic platform add ios
- Generate the icon and splash screen images:
ionic resources
- Build the application for your desired platform. For example:
ionic build android
ionic build ios
- Deploy to a device, or run using Ionic's built in web server. For example:
ionic run ios
ionic run android
ionic serve
Additional information on Ionic and how to work with Ionic projects can be found at http://ionicframework.com/docs/
The next step in development should focus on implementing local notifications and a service to manage the survey schedule while the application is not running in the foreground. Work up until this point has focused on bringing the iOS beta version up to the standard of the Android beta, though the iOS one has yet to be distributed to testers. Some refactoring has been done to simplify the process of making model changes as work continues. The ionic project has been configured for unit testing with the Jasmine framework, and set up to have the tests run in TravisCI.