Managing insulin dosages for individuals with Type 1 diabetes is a complex and high-stakes task due to the constant need to adjust for daily fluctuations in diet, exercise, and blood glucose levels. With the pancreas unable to produce insulin, external insulin administration becomes essential for survival. However, maintaining healthy blood sugar levels is challenging, as they are influenced by dynamic factors such as:
- Carbohydrate intake
- Physical activity
- Stress
- Illness
- Sleep
This variability makes precise insulin dosing difficult.
For example, consuming a high-carbohydrate meal can cause blood glucose levels to spike, requiring a larger insulin dose, while exercise typically lowers blood glucose, necessitating a reduction in insulin or additional carbohydrate intake to prevent hypoglycemia. A person with Type 1 diabetes must balance these opposing effects daily.
Consequences of Misjudging Insulin Needs:
- Too much insulin may cause hypoglycemia during or after exercise.
- Too little insulin can result in hyperglycemia, leading to serious health risks such as:
- Cardiovascular disease
- Kidney failure
- Nerve damage
Acute hypoglycemia can trigger symptoms like dizziness, confusion, seizures, unconsciousness, or even death if not treated promptly. This constant balancing act requires vigilance, flexibility, and real-time decision-making, often relying on personal intuition, which is not always reliable.
To address these challenges, InsulinSync provides real-time insulin dosage recommendations by integrating data inputs from food intake, exercise, and current glucose readings. By offering tailored guidance based on real-time data, InsulinSync aims to minimize the risks associated with improper insulin management and empower users with safer, more effective diabetes control, ultimately enhancing their quality of life.
We propose developing an application, “InsulinSync”, to help people with Type 1 diabetes manage their insulin dosage and maintain normal blood glucose levels.
-
Insulin Dosage Recommendations
After entering a meal, the app calculates a recommended insulin dosage by considering the user’s glucose level, carbohydrate intake, and physical activity. The user verifies all data before processing. -
Continuous Glucose Monitoring Integration
The app connects to a continuous glucose monitor to provide real-time glucose data and allow continuous tracking of glucose levels. -
Exercise Tracking Integration
By synchronizing with health-related applications, InsulinSync tracks the user’s physical activity and adjusts insulin recommendations accordingly. -
Image-Based meal Analysis
A built-in model estimates the carbohydrate content in meals based on images taken by the user. Simply upload or take a picture, and the app does the rest! -
Barcode Scanning for Nutritional Information
Users can scan food product barcodes to retrieve nutritional information, particularly the carbohydrate content. -
Comprehensive Health Data Visualization
The app visualizes glucose levels, insulin dosages, physical activity, and meal data, making it easy to track and manage health information.
InsulinSync simplifies the process of calculating the correct insulin dosage and reduces the risk of human error. This leads to improved diabetes management, better health outcomes, and enhanced quality of life for individuals with Type 1 diabetes.
-
Flutter: An open-source framework to build an application’s user interface (UI) for cross-platform applications.
-
Dart: An object-oriented programming language for cross-platform applications.
-
Node.js: JavaScript runtime environment that handles server-side operations.
-
Python: Employed for deep learning models and data processing tasks.
-
Java: Used for native Android integrations and platform-specific functionalities.
-
Firebase: A set of cloud-based development tools that helps developers build and manage their apps easily.
Before launching the Android version of this Flutter app, ensure you have the following set up on your system:
- Flutter SDK (Latest stable version)
- Android Studio
- Android device/emulator
- A device with Developer Mode enabled or an Android emulator running
You can verify Flutter installation with the following command:
flutter doctorEnsure there are no issues with Android toolchain, Flutter, or device connection.
First, clone the repository to your local machine:
git clone https://github.com/wareefAlyousef/2024-25_GP_3.git
cd wareefAlyousef/2024-25_GP_3Run the following command to install all the required dependencies for the project:
flutter pub getIf you want to test on an emulator, follow these steps:
-Open Android Studio
-Go to AVD Manager (Click the device icon in the top toolbar)
-Create a new virtual device (if none exists)
-Choose a device (e.g., Pixel) and the desired API level (min API should match your minSdkVersion in android/app/build.gradle)
-Start the emulator
If you are testing on a physical device:
- Enable Developer Mode and USB Debugging on your Android device.
- Connect the device via USB.
- Ensure the device is listed by running:
flutter devicesIf you need to adjust build settings like minSdkVersion or app permissions:
- Navigate to
android/app/build.gradlefor SDK configurations. - Adjust
minSdkVersionortargetSdkVersionif necessary.
To build the APK file, which you can manually install on a device or distribute, use the following command:
flutter build apkThis command will generate an APK file in the build/app/outputs/flutter-apk/ directory. You can install it manually on your device or share it with others for testing.
Alternatively, to generate a release version of the APK (optimized for distribution):
flutter build apk --releaseTo run the app on your connected Android device or emulator, use the following command:
flutter runFlutter will detect connected devices and deploy the app to the selected one. If multiple devices are connected, it will prompt you to choose one.
- Device not detected: Make sure USB Debugging is enabled and the correct drivers for your device are installed. You can verify device connection by running:
flutter doctor
- Build errors: Check the terminal output for any error messages. Common issues involve missing dependencies or SDK mismatches. Try running:
Then rebuild the app.
flutter clean
With these steps, you should be able to successfully launch and test the Android version of your Flutter app.
Feel free to reach out for help or report issues through the issues page.