Skip to content

Commit

Permalink
merge main into stepcounter. Add logo
Browse files Browse the repository at this point in the history
  • Loading branch information
o-bagge committed Mar 13, 2024
2 parents 8de13dd + 44b31ac commit c9102bf
Show file tree
Hide file tree
Showing 95 changed files with 6,514 additions and 1,634 deletions.
3 changes: 3 additions & 0 deletions .gitignore
Original file line number Diff line number Diff line change
Expand Up @@ -117,3 +117,6 @@ Temporary Items
.history
.ionide
.vscode/settings.json

# idea folder
.idea
17 changes: 10 additions & 7 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -21,12 +21,14 @@
</p>

## Table of Contents
- [Introduction](#Introduction)
- [Features](#Features)
- [Getting Started](#getting-started)
- [OpenEarable - App v1.3.0](#openearable---app-v130)
- [Table of Contents](#table-of-contents)
- [Introduction](#introduction)
- [Features](#features)
- [Getting Started](#getting-started)
- [Run the app](#run-the-app)
- [Install the app](#install-the-app)
- [Contribute your own example app](#contribute-your-own-example-app)
- [Contribute your own example app](#contribute-your-own-example-app)

## Introduction

Expand Down Expand Up @@ -80,7 +82,8 @@ To get started with the OpenEarable App, you need to have the following:
## Contribute your own example app
If you want to contribute your own example app, please follow the steps below:
1. Create a new folder in the `lib/apps` folder for your app
1. Create a new folder in the `lib/apps_tab` folder for your app
2. Develop your app in the new folder
3. Add an instance of the `AppInfo` class to `sampleApps` property in the `lib/apps/apps_tab.dart` file to include your app in the list of example apps
4. Create a pull request to this repository
3. Add an instance of the `AppInfo` class to `sampleApps` property in the `lib/apps_tab/apps_tab.dart` file to include your app in the list of example apps
4. If your app contains any assets, add the path to your assets to the `pubspec.yaml` file
5. Create a pull request to this repository
53 changes: 53 additions & 0 deletions StretchApp.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,53 @@
# Guided Neck Stretch App

## Goal
This App is used to allow users to easily start a stretching exercise for their neck without a lot of trouble. To ensure that the user doesn't have to look at the screen while enjoying their stretching session, it also has a stats tab which displays valuable information to be viewed after they just stretched. Furthermore the app signals to the user whenever the next stretching session starts and when a break is occuring, so that the user can stay calm and close his eyes without focusing on his own set time constraints.
To ensure a more intimate experience the user can also set his own threshold goals and stretching duration for each of the stretch exercises, and modify the break times in between. If a user is new or unsure how to use this app or to execute the stretch exercises in the right manner, a guide tab is provided to help the user understand the app and it's UI and to show them a video regarding the used stretch exercises.

## Assets
The assets are modified images from the posture tracker app to ensure consistency within the OpenEarable app. These images always display the stretched area with a blue indicator color.
- `Neck_Stretch_Left.png`: Image displaying the neck with indicators of a "left stretch".
- `Neck_Main_Stretch.png`: Image displaying the neck with indicators of a "main stretch".
- `Neck_Right_Stretch.png`: Image displaying the neck with indicators of a "right stretch".
- `Neck_Side_Stretch.png`: Image displaying the neck with indicators of a stretch of both sides of the neck.

## Model
### Stretch Colors
This file stores all colors used within the stretch app to assure easy exchangeability and consistency within this app.

### Stretch State
This file stores all classes used to store stretching information, such as
- `NeckStretchState`: Stores all data concerning a stretching state and it's asset paths
- `StretchStats`: Stores all data concering the most recent stretching session
- `StretchSettings`: Stores all data needed to configure a stretching session
- `NeckStretch`: Provides a one class solution which compromises all of the Model Data into this Class. It provides all functions needed to get and modify the data and also has all the code concerning the stretch state switches.

## View

### App View
This file consiststs of the module used to display all the submodules of this app and is built up just like the normal app selector in the open-earable app itself. Notable is that this is a stateful widget which initializes the final `StretchViewModel` object which is used to store and manage all data needed for this app.

### Stretch Arc Painter
This is a modified version of the `arc_painter` used in the `posture_tracker` app, which draws the right indicators with the right colors from the `stretch_colors.dart` to indicate whether the user is currently stretching in the right direction and to display what area is desireable or undesireable for the current stretch.

### Stretch Roll View
This is a modified version of the `roll_view` used in the `posture_tracker` app, which is used to draw the whole "head area" of a tracking session. This file is edited to support the different neck stretch types and draw the arcs according to them.

### Stretch Settings View
This is the view used to display the settings module and edit all the settings for a neck stretching session. It uses the `TextEditingController` to parse any input by the user, which is then used to set the right settings in the `StretchViewModel` for a stretching exercise.

### Stretch Stats View
This is the view used to display the stats of the most recent stretching exercise. These stats are stored and editied by the `StretchViewModel`.

### Stretch Tracker View
This module is the view of the stretch tracker module. Here you can start stretching and can track your stretching progess via the UI. The UI is drawn using an modified version of the `posture arc_painter.dart`, the `stretch_arc_painter.dart`. This view also provides certain functions to easily draw the head tracker view in other modules.

### Stretch Tutorial View
This is the view for the stretch tutorial module, which is used to show the user how to use this app, and has an embedded youtube video (using an [youtube player package](https://pub.dev/packages/youtube_player_flutter)), which shows all of the neck stretches used by this app.

## View Model
### Stretch View Model
This file stores the `StretchViewModel`, which stores all data used by this app and is used to change it on the fly by the submodules. It also provides the functionality to track the stats of the user for the Stretch Stats View. Furthermore it is used to stop and start the tracking by the earable.

---
By Soheel Dario Aghadavoodi Jolfaei - [GitHub](https://github.com/BasicallyPolaris/oe-app)
1 change: 1 addition & 0 deletions open_earable/devtools_options.yaml
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
extensions:
27 changes: 24 additions & 3 deletions open_earable/ios/Podfile.lock
Original file line number Diff line number Diff line change
Expand Up @@ -5,35 +5,49 @@ PODS:
- flutter_gl (0.0.3):
- Flutter
- three3d_egl (~> 0.1.3)
- flutter_inappwebview (0.0.1):
- Flutter
- flutter_inappwebview/Core (= 0.0.1)
- OrderedSet (~> 5.0)
- flutter_inappwebview/Core (0.0.1):
- Flutter
- OrderedSet (~> 5.0)
- flutter_native_splash (0.0.1):
- Flutter
- open_file (0.0.1):
- Flutter
- OrderedSet (5.0.0)
- path_provider_foundation (0.0.1):
- Flutter
- FlutterMacOS
- permission_handler_apple (9.1.1):
- permission_handler_apple (9.3.0):
- Flutter
- Protobuf (3.24.3)
- reactive_ble_mobile (0.0.1):
- Flutter
- Protobuf (~> 3.5)
- SwiftProtobuf (~> 1.0)
- shared_preferences_foundation (0.0.1):
- Flutter
- FlutterMacOS
- SwiftProtobuf (1.23.0)
- three3d_egl (0.1.3)

DEPENDENCIES:
- app_settings (from `.symlinks/plugins/app_settings/ios`)
- Flutter (from `Flutter`)
- flutter_gl (from `.symlinks/plugins/flutter_gl/ios`)
- flutter_inappwebview (from `.symlinks/plugins/flutter_inappwebview/ios`)
- flutter_native_splash (from `.symlinks/plugins/flutter_native_splash/ios`)
- open_file (from `.symlinks/plugins/open_file/ios`)
- path_provider_foundation (from `.symlinks/plugins/path_provider_foundation/darwin`)
- permission_handler_apple (from `.symlinks/plugins/permission_handler_apple/ios`)
- reactive_ble_mobile (from `.symlinks/plugins/reactive_ble_mobile/ios`)
- shared_preferences_foundation (from `.symlinks/plugins/shared_preferences_foundation/darwin`)

SPEC REPOS:
trunk:
- OrderedSet
- Protobuf
- SwiftProtobuf
- three3d_egl
Expand All @@ -45,6 +59,8 @@ EXTERNAL SOURCES:
:path: Flutter
flutter_gl:
:path: ".symlinks/plugins/flutter_gl/ios"
flutter_inappwebview:
:path: ".symlinks/plugins/flutter_inappwebview/ios"
flutter_native_splash:
:path: ".symlinks/plugins/flutter_native_splash/ios"
open_file:
Expand All @@ -55,17 +71,22 @@ EXTERNAL SOURCES:
:path: ".symlinks/plugins/permission_handler_apple/ios"
reactive_ble_mobile:
:path: ".symlinks/plugins/reactive_ble_mobile/ios"
shared_preferences_foundation:
:path: ".symlinks/plugins/shared_preferences_foundation/darwin"

SPEC CHECKSUMS:
app_settings: 017320c6a680cdc94c799949d95b84cb69389ebc
Flutter: e0871f40cf51350855a761d2e70bf5af5b9b5de7
flutter_gl: 5a5603f35db897697f064027864a32b15d0c421d
flutter_inappwebview: 3d32228f1304635e7c028b0d4252937730bbc6cf
flutter_native_splash: 52501b97d1c0a5f898d687f1646226c1f93c56ef
open_file: 02eb5cb6b21264bd3a696876f5afbfb7ca4f4b7d
path_provider_foundation: 29f094ae23ebbca9d3d0cec13889cd9060c0e943
permission_handler_apple: e76247795d700c14ea09e3a2d8855d41ee80a2e6
OrderedSet: aaeb196f7fef5a9edf55d89760da9176ad40b93c
path_provider_foundation: 3784922295ac71e43754bd15e0653ccfd36a147c
permission_handler_apple: 036b856153a2b1f61f21030ff725f3e6fece2b78
Protobuf: 970f7ee93a3a08e3cf64859b8efd95ee32b4f87f
reactive_ble_mobile: 9ce6723d37ccf701dbffd202d487f23f5de03b4c
shared_preferences_foundation: b4c3b4cddf1c21f02770737f147a3f5da9d39695
SwiftProtobuf: b70d65f419fbfe61a2d58003456ca5da58e337d6
three3d_egl: de2cd4950ad2d5f2122166c36583bde4c812e7b5

Expand Down
119 changes: 57 additions & 62 deletions open_earable/ios/Runner/Info.plist
Original file line number Diff line number Diff line change
@@ -1,66 +1,61 @@
<?xml version="1.0" encoding="UTF-8"?>
<!DOCTYPE plist PUBLIC "-//Apple//DTD PLIST 1.0//EN" "http://www.apple.com/DTDs/PropertyList-1.0.dtd">
<plist version="1.0">
<dict>
<key>CADisableMinimumFrameDurationOnPhone</key>
<true/>
<key>CFBundleDevelopmentRegion</key>
<string>$(DEVELOPMENT_LANGUAGE)</string>
<key>CFBundleDisplayName</key>
<string>OpenEarable</string>
<key>CFBundleExecutable</key>
<string>$(EXECUTABLE_NAME)</string>
<key>CFBundleIdentifier</key>
<string>$(PRODUCT_BUNDLE_IDENTIFIER)</string>
<key>CFBundleInfoDictionaryVersion</key>
<string>6.0</string>
<key>CFBundleName</key>
<string>OpenEarable</string>
<key>CFBundlePackageType</key>
<string>APPL</string>
<key>CFBundleShortVersionString</key>
<string>$(FLUTTER_BUILD_NAME)</string>
<key>CFBundleSignature</key>
<string>????</string>
<key>CFBundleVersion</key>
<string>$(FLUTTER_BUILD_NUMBER)</string>
<key>ITSAppUsesNonExemptEncryption</key>
<false/>
<key>LSApplicationCategoryType</key>
<string>aps-environment</string>
<key>LSRequiresIPhoneOS</key>
<true/>
<key>NSBluetoothAlwaysUsageDescription</key>
<string>This app uses bluetooth to connect to earable devices</string>
<key>NSBluetoothPeripheralUsageDescription</key>
<string>This app uses bluetooth to connect to earable devices</string>
<key>UIApplicationSupportsIndirectInputEvents</key>
<true/>
<key>UIBackgroundModes</key>
<array>
<string>fetch</string>
<string>remote-notification</string>
</array>
<key>UILaunchStoryboardName</key>
<string>LaunchScreen</string>
<key>UIMainStoryboardFile</key>
<string>Main</string>
<key>UISupportedInterfaceOrientations</key>
<array>
<string>UIInterfaceOrientationPortrait</string>
<string>UIInterfaceOrientationLandscapeLeft</string>
<string>UIInterfaceOrientationLandscapeRight</string>
</array>
<key>UISupportedInterfaceOrientations~ipad</key>
<array>
<string>UIInterfaceOrientationPortrait</string>
<string>UIInterfaceOrientationPortraitUpsideDown</string>
<string>UIInterfaceOrientationLandscapeLeft</string>
<string>UIInterfaceOrientationLandscapeRight</string>
</array>
<key>UIViewControllerBasedStatusBarAppearance</key>
<false/>
<key>UIStatusBarHidden</key>
<false/>
</dict>
<dict>
<key>CADisableMinimumFrameDurationOnPhone</key>
<true/>
<key>CFBundleDevelopmentRegion</key>
<string>$(DEVELOPMENT_LANGUAGE)</string>
<key>CFBundleDisplayName</key>
<string>OpenEarable</string>
<key>CFBundleExecutable</key>
<string>$(EXECUTABLE_NAME)</string>
<key>CFBundleIdentifier</key>
<string>$(PRODUCT_BUNDLE_IDENTIFIER)</string>
<key>CFBundleInfoDictionaryVersion</key>
<string>6.0</string>
<key>CFBundleName</key>
<string>OpenEarable</string>
<key>CFBundlePackageType</key>
<string>APPL</string>
<key>CFBundleShortVersionString</key>
<string>$(FLUTTER_BUILD_NAME)</string>
<key>CFBundleSignature</key>
<string>????</string>
<key>CFBundleVersion</key>
<string>$(FLUTTER_BUILD_NUMBER)</string>
<key>ITSAppUsesNonExemptEncryption</key>
<false/>
<key>LSApplicationCategoryType</key>
<string>aps-environment</string>
<key>LSRequiresIPhoneOS</key>
<true/>
<key>NSBluetoothAlwaysUsageDescription</key>
<string>This app uses bluetooth to connect to earable devices</string>
<key>NSBluetoothPeripheralUsageDescription</key>
<string>This app uses bluetooth to connect to earable devices</string>
<key>UIApplicationSupportsIndirectInputEvents</key>
<true/>
<key>UILaunchStoryboardName</key>
<string>LaunchScreen</string>
<key>UIMainStoryboardFile</key>
<string>Main</string>
<key>UIStatusBarHidden</key>
<false/>
<key>UISupportedInterfaceOrientations</key>
<array>
<string>UIInterfaceOrientationPortrait</string>
<string>UIInterfaceOrientationLandscapeLeft</string>
<string>UIInterfaceOrientationLandscapeRight</string>
</array>
<key>UISupportedInterfaceOrientations~ipad</key>
<array>
<string>UIInterfaceOrientationPortrait</string>
<string>UIInterfaceOrientationPortraitUpsideDown</string>
<string>UIInterfaceOrientationLandscapeLeft</string>
<string>UIInterfaceOrientationLandscapeRight</string>
</array>
<key>UIViewControllerBasedStatusBarAppearance</key>
<false/>
</dict>
</plist>
5 changes: 1 addition & 4 deletions open_earable/ios/Runner/Runner.entitlements
Original file line number Diff line number Diff line change
@@ -1,8 +1,5 @@
<?xml version="1.0" encoding="UTF-8"?>
<!DOCTYPE plist PUBLIC "-//Apple//DTD PLIST 1.0//EN" "http://www.apple.com/DTDs/PropertyList-1.0.dtd">
<plist version="1.0">
<dict>
<key>aps-environment</key>
<string>development</string>
</dict>
<dict/>
</plist>
5 changes: 1 addition & 4 deletions open_earable/ios/Runner/RunnerDebug.entitlements
Original file line number Diff line number Diff line change
@@ -1,8 +1,5 @@
<?xml version="1.0" encoding="UTF-8"?>
<!DOCTYPE plist PUBLIC "-//Apple//DTD PLIST 1.0//EN" "http://www.apple.com/DTDs/PropertyList-1.0.dtd">
<plist version="1.0">
<dict>
<key>aps-environment</key>
<string>development</string>
</dict>
<dict/>
</plist>
6 changes: 3 additions & 3 deletions open_earable/ios/ci_scripts/ci_post_clone.sh
Original file line number Diff line number Diff line change
Expand Up @@ -5,8 +5,8 @@ set -e

# by default, the execution directory of this script is the ci_scripts directory
# CI_WORKSPACE is the directory of your cloned repo
echo "🟩 Navigate from ($PWD) to ($CI_WORKSPACE)"
cd $CI_WORKSPACE
echo "🟩 Navigate from ($PWD) to ($CI_WORKSPACE_PATH)"
cd $CI_WORKSPACE_PATH

echo "🟩 Install Flutter"
time git clone https://github.com/flutter/flutter.git -b stable $HOME/flutter
Expand All @@ -16,7 +16,7 @@ echo "🟩 Flutter Precache"
time flutter precache --ios

echo "🟩 Install Flutter Dependencies"
cd open_earable
cd repository/open_earable
time flutter clean
time flutter pub get
time flutter pub upgrade
Expand Down
Loading

0 comments on commit c9102bf

Please sign in to comment.