diff --git a/app/build.gradle b/app/build.gradle index 2e9cb45..e9d848e 100644 --- a/app/build.gradle +++ b/app/build.gradle @@ -30,13 +30,13 @@ allprojects { android { compileSdkVersion 28 - buildToolsVersion "29.0.1" + buildToolsVersion "29.0.2" defaultConfig { applicationId "de.tadris.fitness" minSdkVersion 21 targetSdkVersion 28 - versionCode 1 - versionName "1.0" + versionCode 103 + versionName "1.0.3" testInstrumentationRunner "android.support.test.runner.AndroidJUnitRunner" } buildTypes { diff --git a/app/src/main/java/de/tadris/fitness/activity/RecordWorkoutActivity.java b/app/src/main/java/de/tadris/fitness/activity/RecordWorkoutActivity.java index 1a8f617..4314f15 100644 --- a/app/src/main/java/de/tadris/fitness/activity/RecordWorkoutActivity.java +++ b/app/src/main/java/de/tadris/fitness/activity/RecordWorkoutActivity.java @@ -306,7 +306,7 @@ public class RecordWorkoutActivity extends FitoTrackActivity implements Location @Override public void onGPSStateChanged(WorkoutRecorder.GpsState oldState, WorkoutRecorder.GpsState state) { - gpsStatusView.setTextColor(state.color); + mHandler.post(() -> gpsStatusView.setTextColor(state.color)); } public static class InfoViewHolder{ diff --git a/app/src/main/java/de/tadris/fitness/map/MapManager.java b/app/src/main/java/de/tadris/fitness/map/MapManager.java index 41d373b..5c700f3 100644 --- a/app/src/main/java/de/tadris/fitness/map/MapManager.java +++ b/app/src/main/java/de/tadris/fitness/map/MapManager.java @@ -28,7 +28,6 @@ import org.mapsforge.map.layer.download.TileDownloadLayer; import de.tadris.fitness.map.tilesource.FitoTrackTileSource; import de.tadris.fitness.map.tilesource.MapnikTileSource; -import de.tadris.fitness.map.tilesource.ThunderforestTileSource; import de.tadris.fitness.map.tilesource.TileSources; public class MapManager { @@ -36,8 +35,8 @@ public class MapManager { public static TileDownloadLayer setupMap(MapView mapView, TileSources.Purpose purpose){ FitoTrackTileSource tileSource; switch (purpose){ - case OUTDOOR: tileSource= ThunderforestTileSource.OUTDOORS; break; - case CYCLING: tileSource= ThunderforestTileSource.CYLE_MAP; break; + /*case OUTDOOR: tileSource= ThunderforestTileSource.OUTDOORS; break; + case CYCLING: tileSource= ThunderforestTileSource.CYLE_MAP; break;*/ case DEFAULT: default: diff --git a/app/src/main/java/de/tadris/fitness/util/CalorieCalculator.java b/app/src/main/java/de/tadris/fitness/util/CalorieCalculator.java index d253ac3..d6064aa 100644 --- a/app/src/main/java/de/tadris/fitness/util/CalorieCalculator.java +++ b/app/src/main/java/de/tadris/fitness/util/CalorieCalculator.java @@ -41,36 +41,24 @@ public class CalorieCalculator { * * workoutType and avgSpeed of workout have to be set * + * Calculation currently ignores height. + * * @param workout * @return MET */ public static double getMET(Workout workout){ + double speedInKmh= workout.avgSpeed * 3.6; if(workout.workoutType.equals(Workout.WORKOUT_TYPE_RUNNING)){ - if(workout.avgSpeed < 3.2){ - return 1.5; - }else if(workout.avgSpeed < 4.0){ - return 2.5; - }else if(workout.avgSpeed < 4.8){ - return 3.25; - }else if(workout.avgSpeed < 5.9){ - return 4.0; - }else if(workout.avgSpeed < 7.0){ - return 5.0; - }else if(workout.avgSpeed < 8.0){ - return 7.0; - }else if(workout.avgSpeed < 9.6){ - return 9.0; - }else if(workout.avgSpeed < 12.8){ - return 12.0; - }else{ - return 16; - } + // This is a linear graph based on the website linked above + return Math.max(1.5, speedInKmh*1.117 - 2.1906); } if(workout.workoutType.equals(Workout.WORKOUT_TYPE_HIKING)){ - return 6.3; + // Use fixed MET because no more precise calculation was found + return 6.0; } if(workout.workoutType.equals(Workout.WORKOUT_TYPE_CYCLING)){ - return Math.max(3, (workout.avgSpeed-10) / 1.5); + // This is a linear graph based on the website linked above + return Math.max(3, (speedInKmh-10) / 1.5); } return -1; } diff --git a/app/src/main/res/drawable/logo_combined.png b/app/src/main/res/drawable/logo_combined.png new file mode 100644 index 0000000..1340b01 Binary files /dev/null and b/app/src/main/res/drawable/logo_combined.png differ diff --git a/metadata/de/full_description.txt b/metadata/de/full_description.txt new file mode 100644 index 0000000..3437879 --- /dev/null +++ b/metadata/de/full_description.txt @@ -0,0 +1,6 @@ +FitoTrack ist eine App zum aufzeichnen und auswerten deiner Workouts. Ob du läufst, Fahrrad fährst oder wanderst: FitoTrack zeigt die wichtigsten Daten mit detaillierten Diagrammen und Statistiken. Es ist Open-Source und komplett ohne Werbung! + +Funktionen: +* Workouts aufzeichnen. Wähle deine Sportart und fange einfach an zu laufen/Fahrrad fahren/wandern. Du kannst währenddessen die wichtigest Informationen unter der Karte sehen. +* Workouts angucken. Schaue dir allgemeine Informationen an wie Datum, Dauer, Distanz, Geschwindigkeit, Pace, etc. Sehe die Route auf einer Karte. Untersuche deine Leistung im Geschwindigkeitsdiagramm. +* Open-Source. Es gibt keine Werbung, kein Tracking und der source code ist öffentlich zugänglich für jeden unter der GPLv3-Lizenz. \ No newline at end of file diff --git a/metadata/de/short_description.txt b/metadata/de/short_description.txt new file mode 100644 index 0000000..ee33baf --- /dev/null +++ b/metadata/de/short_description.txt @@ -0,0 +1 @@ +Ein Fitness Tracker, der deine Privatsphäre achtet \ No newline at end of file diff --git a/metadata/en-US/changelogs/101.txt b/metadata/en-US/changelogs/101.txt new file mode 100644 index 0000000..620bccb --- /dev/null +++ b/metadata/en-US/changelogs/101.txt @@ -0,0 +1 @@ +- Fixed Crash \ No newline at end of file diff --git a/metadata/en-US/changelogs/103.txt b/metadata/en-US/changelogs/103.txt new file mode 100644 index 0000000..cc4425f --- /dev/null +++ b/metadata/en-US/changelogs/103.txt @@ -0,0 +1 @@ +- Fix calorie calculation \ No newline at end of file diff --git a/metadata/en-US/full_description.txt b/metadata/en-US/full_description.txt new file mode 100644 index 0000000..eee457b --- /dev/null +++ b/metadata/en-US/full_description.txt @@ -0,0 +1,6 @@ +FitoTrack is a mobile app for logging and viewing your workouts. Whether you’re running, cycling or hiking FitoTrack will show you give you the most important information with detailed charts and statistics. It is open-source and completely ad-free. + +Features: +* Track workouts. Choose your sports type and just start running/cycling/hiking/etc. You can see general information right below the map on the track screen. +* View your workouts. View general information like date, time, duration, distance, speed, pace. See your route on a map. Investigate how you performed in the speed diagram. +* Open-Source. There is no advertisement, no tracking and the source code is open and licensed under the GPLv3. \ No newline at end of file diff --git a/metadata/en-US/short_description.txt b/metadata/en-US/short_description.txt new file mode 100644 index 0000000..b5bf516 --- /dev/null +++ b/metadata/en-US/short_description.txt @@ -0,0 +1 @@ +A privacy orientated fitness tracker \ No newline at end of file