diff --git a/README.md b/README.md index feed05a..e4229e3 100644 --- a/README.md +++ b/README.md @@ -7,23 +7,39 @@ The platform consists of two parts: ## How it Works - The mobile application pings the server every 2 hours to send data. The following data types are supported- + - Active Calories Burned (`activeCaloriesBurned`) + - Basal Body Temperature (`basalBodyTemperature`) - Basal Metabolic Rate (`basalMetabolicRate`) - Blood Glucose (`bloodGlucose`) - Blood Pressure (`bloodPressure`) - Body Fat (`bodyFat`) + - Body Temperature (`bodyTemperature`) + - Bone Mass (`boneMass`) + - Cervical Mucus (`cervicalMucus`) - Distance (`distance`) - Exercise (`exerciseSession`) + - Elevation Gained (`elevationGained`) + - Floors Climbed (`floorsClimbed`) - Heart Rate (`heartRate`) - Height (`height`) + - Hydration (`hydration`) + - Lean Body Mass (`leanBodyMass`) + - Menstruation Flow (`menstruationFlow`) + - Menstruation Period (`menstruationPeriod`) - Nutrition (`nutrition`) + - Ovulation Test (`ovulationTest`) - Oxygen Saturation (`oxygenSaturation`) - Power (`power`) + - Respiratory Rate (`respiratoryRate`) + - Resting Heart Rate (`restingHeartRate`) - Sleep (`sleepSession`) - Speed (`speed`) - Steps (`steps`) + - StepsCadence (`stepsCadence`) - Total Calories Burned (`totalCaloriesBurned`) - VO2 Max (`vo2Max`) - Weight (`weight`) + - Wheelchair Pushes (`wheelchairPushes`) Support for more types is planned for the future. @@ -38,7 +54,7 @@ The platform is currently a **one way sync**. Any changes made to health connect - You can install the mobile application through the APK file. You can find the latest APK file in the releases section of this repository, or by downloading the `app-release.apk` file from the root of this repository. - The minimum requirement for the APK file is Android Oreo (8.0) - Once you install the Android APK file, signup by entering a username and password -- Once you see a screen showing your user id, you have successfully signed up. Your data will sync in 2 hours. You can also force it to start now by going to Settings > Apps > HCGateway > Force Stop, then re-opening the app. This can be done for any time you want to force a sync. +- Once you see a screen showing your user id, you have successfully signed up. Your data will sync in 2 hours. This is customizable. You also have the option to force a sync any time through the application. ## Database ### Users Structure @@ -129,7 +145,7 @@ The mobile application is a simple Android application that pings the server eve ## Self Hosting You can self host the server and database. To do this, follow the steps below: -- You need Python 3 and NodeJS 16+ installed on your machine +- You need Python 3 and NodeJS 18+ installed on your machine - Install appwrite and make sure your instance is accessible from the machine running the HCGateway server. You can find more at https://appwrite.io/ - Clone this repository - `cd` into the api/ folder @@ -137,6 +153,7 @@ You can self host the server and database. To do this, follow the steps below: - rename `.env.example` to `.env` and fill in the values - run `python3 main.py` to start the server - in another window/tab, `cd` into the app/ folder -- Change lines 104, 112, and 154 of `app/App.js` to point to your HCGateway server - run `npm install` +- run `npx patch-package` to apply a patch to the foreground service library - run `npm run android` to start the application, or follow the instructions at https://medium.com/geekculture/react-native-generate-apk-debug-and-release-apk-4e9981a2ea51 to build an APK file. + - It is also possible to now use eas build to build the APK file. You can find more at https://docs.expo.dev/build/eas-build/ **NOTE: This must be a local build, since you need to run patch-package before building the APK file.** \ No newline at end of file