Skip to content

EcoSwitch Mobile Application

Michael Harkess edited this page Apr 30, 2022 · 1 revision

EcoSwitch Mobile Application

Table of Contents

  1. About The Project
  2. Software Module Overview
  3. Dependencies Between Modules
  4. Development and Build Information
  5. Getting Started
  6. Contact

About The Project

One of the original desired deliverables given by the client is a cross-platform mobile application that students can use to monitor and manage the temperature in their rooms. Students can log in using their given BU email and view their associated information.

(back to top)

Software Module Overview

Currently, the application has one main module that contains all functionality. While this is bad practice, it was Keven's first time using React Native for a large scale project and due to time constraints he could not reorganize the code.

App.js

The driving module for the mobile application. Developed using the React Native Framework and Javascript. This module includes three screens for the user to navigate through, each detailed below.

Login Screen

This is where users will sign in with their given BU email account, using Google Authentication to secure the interaction. The app prevents any emails outside of the proper domain (@bu.edu) from signing into the application. This feature was implemented as an extra authentication step since only BU students should be using the application.

Main Screen

This screen displays the current temperature and humidity reported by the user's assigned device. The information is fetched from our backend database based off of the user login. The values presented to the user refreshes every 10 seconds in the development build, but will be changed to every 5 minutes for production. Users can also set a desired temperature for their room, which the device will adapt to accordingly.

Credits Screen

A simple screen displaying the names of the project contributors. Accessed through tapping the logo in the upper-right corner.

styles.js

A separate JavaScript file that contains all the formatting for different elements in each screen render.

(back to top)

Dependencies Between Modules

Below is a simple flow diagram of the different pages used in App.js, how they interact with one another, and some functions of each where applicable.

Development and Build Information

All installed dependencies for the project can be found within the package.json and package-lock.json files found within this directory.

Developed and built using the following programs and versions:

(back to top)

Getting Started

Prerequisites Installation

Install the software mentioned above in the Development and Build Information section. This varies per system and operating system. Please refer to the respective websites for further installation information.

Once repository is cloned, navigate to this directory (.../EcoSwitch/EcoSwitchApp) and run the following code to automatically install dependencies from package.json:

npm install

Alternatively, the following also works:

expo install

Usage

For development mode, use Expo and ExpoGo.

  1. In the project directory, start the session with the following command:
expo start
  1. With mobile device with ExpoGo installed, scan the provided QR code and open the application.

OR

  1. Access the project pre-production build, hosted using Amplify.
    • LINK
    • Please note that this build does not work properly at this time.

(back to top)

Contact

If there are any further questions about the application project, please contact the lead developer via email.

(back to top)

Clone this wiki locally