Skip to content

hazzaRR/AndroidExerciseDetectionApp

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

15 Commits
 
 
 
 
 
 

Repository files navigation

Prototype Exercise Detection Android App

To use the prototype Android app, please follow the instructions below:

Prerequisites

Before attempting to run any Python code, set up a Conda environment using the environment.yml file provided.

To do this open a terminal in the server directory of this project and run the he following command to create a new Conda environment:

conda env create --file environment.yml

Next activate the Conda environment using the command:

conda activate gym_classification

  • Make sure you have set up the Flask server by running the following command in the root of the server directory:
flask run --host=0.0.0.0

Configuring the Android App

  1. In the root directory of the project, navigate to the server directory.

  2. Start the Flask server by running the following command:

flask run --host=0.0.0.0

This will start the Flask server on your local machine.

  1. Once the server is running, copy the IP address displayed at the bottom of the terminal/console.

  2. Open the MainActivity.java file located in the front-end code of the Android app.

  3. Look for line 122 in the MainActivity.java file, which should contain the URL for the Flask server.

  4. Replace the existing IP address in the URL with the IP address you copied in step 3.

line 122 should look like this once completed : sendPostRequest("your_url/predict", sensorData);

Building and Running the Android App

  1. Enable developer mode and USB debugging on your Android phone. Refer to the official documentation for your specific Android device on how to enable these options.

  2. Connect your Android phone to your computer via USB.

  3. Open the project in Android Studio.

  4. Build the app onto your Android phone using Android Studio.

  5. Once the app is successfully installed on your phone, you can launch and use it for gym exercise classification.

About

No description, website, or topics provided.

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published

Languages