MentalHealthNow

View project on GitHub

MentalHealthNow

About!

This app is aimed to help students find a different means to contact professionals about their mental health as well as provide various activities for the students to do, as well as provide another avenue of emergency contact if needed. The team members for this project are Nikhila Cheepurupalli, Kristeen Ginn, Mackenzie West, and Michael Whitehead.

Demo Video!

Click to watch our demo video!

Sneak Peek!

Technical Details!

The main tools being used to create this app are Android Studio and Firebase.

Written following the Kotlin style guide: https://developer.android.com/kotlin/style-guide

Required software for this app: Firebase, Android Studio (or other compatible IntelliJ software), Physical Android Device / Android emulator.

Getting Started - Setting Up!

Open the Android Studio application and start a new Android Studio project. Change the application name and if needed, the company domain and click Next. When selecting the form factors and API, choose ‘API 21:Android 5.0 (Lollipop)’ and click Next. Choose a Empty Activity and click Next. Finally, change the activity name and the layout name and click Finish. The activity name and layout name can be changed later at will.

Building the App!

Android Studio provides resources to build an apk within the SDK. While in the SDK, go to Build > Build Bundle(s) / APK(s) > Build APK(s). This will build a debug-apk.apk file within the app\build\outputs\apk\debug path of the project. You can select other build variants by going to Build > Select Build Variant…, which will open a menu to select the desired build variant. You can create a signed APK for release by going to Build > Generate Signed Bundle / APK… which will create a signed APK that can be published.

Installing and Running!

In order to install the MentalHealthNow APK the first time, run the following command in the terminal:

adb install [path_to_apk]

where [path_to_apk] is the directory path to the APK file. This will install the APK file to the connected device.

Too install and replace a previous version of the app, use the “-r” option:

adb isntall -r [path_to_apk]

After installing the APK file to the device, the app can be run by clicking the app on the device. It can also be run by entering the following command in the command line:

adb shell am start -n “com.example.nikhila.mentalhealthnowbeta/com.example.nikhila.mentalhealthnowbeta.MainActivity” -a android.intent.action.MAIN -c android.intent.category.LAUNCHER

This will start the app from the Main Activity.

Testing!

Concerning the initial Milestone 12 test deliverables:

Behavioral test. Our behavioral tests were written using Espresso to test the core functionality of the app, such as login, registering an account, sending a message, and various activities. These tests simulate a user using the different functions on the phone to guarantee that these core functionalities work as intended.

Unit test. Our unit test takes in a variable and expected value for that variable, then checks to see if the result matches the expected value or not. Unit tests have been applied to a various number of objects within the app to guarantee that each object has the correct value and that value can be successfully edited. The unit tets were written using JUnit.

The following command can be written in the command line to run the tests:

adb shell am instrument -w ‘com.example.nikhila.mentalhealthnowbeta’/com.android.test/android.support.test.runner.AndroidJUnitRunner