My pet project to track street workouts results.
-
stores log of exercises. Data stored: kind, quantity, additional weight (optional), date and time.
-
shows graph for recent six month.
-
additional weight can be used as quantity multiplication coeficient according to the body weight value.
-
excercise type can be added, renamed or removed. Excercise type name is in English by default and is not localizable (however it may be adjusted manually)
-
has
exportandimportfeature (despite the fact that Pixel 4a copied data from an old phone).Export tocan share exercises results using thesharestandard Android dialog. I export data toGoogle Diskstorage using this feature.
Android 6 (API level 23) has
Doze
power saving mode implemented.
This prevents apps to set alarm more than once per 9 minutes, per app. as documented.
This may be a problem if exercises are short and pauses between exercises are less than 9 minutes.
This may be resolved by turning a battery optimization off (Settings - Battery) however this may cause a battery drain.
I've found that there is a way to get notifications each five minutes between exercises.
I add new result and leave an application running foreground. Then I lock screen and put the phone to a pocket.
This makes notifications running each five minutes e.g.
However the notification is not raised in time when I minimize the application and lock the screen.
The application interface is pretty simple. It has main screen, new item screen, settings and charts pages.
Main screen has the list of exercise kinds and latest data per exercise.
New exersice results is registered when + button is pressed. Quantity and additional weight (if any) should be specified here.
The exercise history is available by single click on the row. You can browse the exercise history by day using Back and Forward buttons in the left bottom corner.
The chart page is available by context menu (three dots in the upper right part of the screen)
Stores workout log data using Flutter Hive Db
I've to modify the generated Hive adapters source code in order to support old database structure.
My first attempt was to check how many fields have a data record and to read from data source if there are column for the current row.
Like if (numOfFields > 3) value = data[3]
Then I changed it like value = data[3] == null ? 0 : data[3] as int
Uses the AndroidAlarmManager to create a next exercise notification. However callbacks are executed in the alarm manager isolation. I've used SharedPreferences to save the notification configuration by the app and to load the config by the callback method. The notification config instance is serialized as Json string and stored as shared preference value.
The ringtone player produces notification sound.
en and uk localizations are supported.
Commands below should re-generate app_localizations.dart source code.
flutter gen-l10n --template-arb-file=app_en.arbwhere app_en.arb is the resource file name.
Android alarm manager notifications are not fired with Flutter 3.3.2 and android_alarm_manager_plus 2.0.7 plugin