-
Marvin Weiler authoredMarvin Weiler authored
OBS App
Connect to the OpenBikeSensor and record overtakes on your Trip.
Install the app on your phone
There are two ways to install the app.
(Prefered) Use Obtainium.
- Download an install Obtainium from https://obtainium.imranr.dev/
- After installing Obtainium open the following link: Install the obs app!.
- Obtainium will watch for updates and help install updates to the app
Download the lastest apk from the release page
- Go to https://gitlab.fachschaften.org/togir2/obs-app/-/releases
- Download the apk and install it.
Development
Getting Started
The App is written in Flutter please consult the flutter setup guides to setup your development enviorment
For help getting started with Flutter development, view the online documentation, which offers tutorials, samples, guidance on mobile development, and a full API reference.
Architecture
The app is split in two parts:
-
foreground_task: This part is responsible for connecting to the OBS, fetching location and record the overtake events. This part is running in a "foregorund_runner".
-
Main Isolate (Main UI): Display the UI of the app.
The two part communicate via the "events.dart" class.
Translations
The app is (currently) available in German and Englisch. Internationalization is done with flutter_localization. The strings are in the folder lib/l10n. After adding a new String to the .arb file you must run:
flutter gen-l10n
Database
The app uses isar as database. The models live in lib/database. If you change the models you must regenerate isar code to use them:
dart run build_runner build
Currently the generated code is version controlled via the git repo.
Release a new version
- Update the version field in **pubspec.yaml.
- Create a git tag with the same version number
git tag <number>
- Push the tag to trigger a pipeline
git push --tags origin
- After the pipeline is run the compiled file is upload to the package registry
- Create a gitlab release link the file from the release as a package. Use the following template for the filename
obsapp-arm64-v8a-release-version.apk