diff --git a/README.md b/README.md deleted file mode 100644 index 8bb023662..000000000 --- a/README.md +++ /dev/null @@ -1,178 +0,0 @@ -# OpenTracks logo OpenTracks: a sport tracker - -_OpenTracks_ is a sport tracking application that completely respects your privacy. - -[![Awesome Humane Tech](https://codeberg.org/teaserbot-labs/delightful-humane-design/raw/branch/main/humane-tech-badge.svg)](https://delightful.club/delightful-humane-design/#health) - - - - - - - - - - - - - - - - - -
Free (F-Droid)Free (Nightly for F-Droid)Donations
- - Get it on F-Droid - - - - Nightly builds (for F-Droid client) - - - - Donate using Liberapay - -
- OpenTracks version published on F-Droid - - - Get it on Google Play - -
- -Translations are hosted on -hosted.weblate.org. - -Translation status - - -## Screenshots - -
- - - - -
-
- - - - -
- -## Features -* __Tracking:__ track your sport and outdoor activities -* __Voice announcements__ -* __Photos and Markers:__ mark interesting locations while tracking -* __Export:__ - * export tracks either as [KMZ 2.3](https://docs.opengeospatial.org/is/12-007r2/12-007r2.html) (incl. photos), [KML 2.3](https://docs.opengeospatial.org/is/12-007r2/12-007r2.html), or [GPX 1.1](https://www.topografix.com/GPX/1/1/) - * export automatically after each recording (e.g., to sync via [Nextcloud](https://nextcloud.com/)) - * avoid duplication: each exported file contain a random unique identifier (i.e., `opentracks:trackid`) -* __Altitude:__ - * gain/loss via barometric sensor (if present) - * shown in EGM2008 (above mean sea level); exported as WGS84 -* __Bluetooth LE sensors:__ - * heart rate - * cycling: speed and distance - * cycling: cadence - * cycling: power meter - * running: speed and cadence - * support for BLE sensor training only (i.e., without GPS) for indoor training - - An overview of tested sensors: [README_TESTED_SENSORS.md](README_TESTED_SENSORS.md) - -### Gadgetbridge integration - -OpenTracks can be used with [Gadgetbridge](https://www.gadgetbridge.org/): -* shows statistics via notification on smart watches (requires Gadgetbridge 0.56.1 or later), and -* Gadgetbridge's GPX exporter generates `opentracks:trackid` to avoid duplication (Gadgetbridge 0.53.0 or later). - -### Privacy -* __No Internet access:__ Internet is not used -* __No advertising__ -* __No in-app analytics__ -* __No use of Google Play Services__ - -__Only required permissions:__ -* _ACCESS_FINE_LOCATION_: required to use the GPS. -* _ACCESS_BACKGROUND_LOCATION_: required to start recording with GPS while phone is in standby. (e.g. when triggered by Public API from an external device) - -### Public API - -OpenTracks includes an API for starting/stopping recording by another installed application (e.g., [Automate](https://llamalab.com/automate/), [Tasker](https://tasker.joaoapps.com), or [Easer](https://github.com/renyuneyun/Easer)). -The API can be invoked by sending an explicit Intent to start an activity. - -`Package` (depends on the variant installed): -* F-Droid: `de.dennisguse.opentracks` -* GooglePlay: `de.dennisguse.opentracks.playStore` -* Debug: `de.dennisguse.opentracks.debug` -* Nightly: `de.dennisguse.opentracks.nightly` - -`Class`: - -* **Start a recording:** `de.dennisguse.opentracks.publicapi.StartRecording` -* **Stop a recording:** `de.dennisguse.opentracks.publicapi.StopRecording` - -For testing via adb: `adb shell am start -e someParameter someValue -n "package/class"` - -`StartRecording` supports the following parameters: - -* Set track data: `TRACK_NAME`, `TRACK_DESCRIPTION`, `TRACK_CATEGORY`, and `TRACK_ICON` (non-localized identifier see [/src/main/java/de/dennisguse/opentracks/util/TrackIconUtils.java#L38](/src/main/java/de/dennisguse/opentracks/util/TrackIconUtils.java#L38)). - NOTE: if `TRACK_ICON` is not present, `TRACK_CATEGORY` will be used to determine the icon (localized). -* Send recorded data to another application via _Dashboard API_: `STATS_TARGET_PACKAGE` and `STATS_TARGET_CLASS` - -The Public API is disabled by default to protect the user's privacy, but it can easily be enabled in the settings. - -## File formats compatibility with open-source software -| | [GPX 1.1](https://www.topografix.com/GPX/1/1/) | [KML 2.3](https://docs.opengeospatial.org/is/12-007r2/12-007r2.html) | [KMZ 2.3](https://docs.opengeospatial.org/is/12-007r2/12-007r2.html) | -|-----------------------------------------------------------|--------------------------------------------------------------------------------|----------------------------------------------------------------------|----------------------------------------------------------------------| -| [OpenLayers 7.1.0](https://openlayers.org/) | ? | [no](https://github.com/openlayers/openlayers/issues/14104) | [no](https://github.com/openlayers/openlayers/issues/14104) | -| [Golden Cheetah 3.5](https://www.goldencheetah.org/) | ? | [no](https://github.com/GoldenCheetah/GoldenCheetah/issues/4271) | [no](https://github.com/GoldenCheetah/GoldenCheetah/issues/4271) | -| [GpxPod](https://apps.nextcloud.com/apps/gpxpod) | ? | ? | ? | -| [OsmAnd](https://github.com/osmandapp/OsmAnd) | ? | [no](https://github.com/osmandapp/OsmAnd/issues/15271) | [no](https://github.com/osmandapp/OsmAnd/issues/15271) | -| [FitTrackee](https://github.com/SamR1/FitTrackee) | yes | n/a | n/a | -| [SportsTracker](https://github.com/ssaring/sportstracker) | yes, [single tracks only](https://github.com/ssaring/sportstracker/issues/260) | no | no | - -## Dashboard API (incl. map) - -As of v3.3.1, OpenTracks supports custom dashboards for displaying previously recorded and live -tracks. - -The reference implementation is [OSMDashboard](https://github.com/OpenTracksApp/OSMDashboard), which -presents an OpenStreetMap map (showing the current track, incl. updates). The Dashboard API is also -used by [Gadgetbridge](https://codeberg.org/Freeyourgadget/Gadgetbridge/) for displaying live track -statistics on supported wearables. - -Alternatively, recorded tracks can be shared as KMZ/GPX with installed applications ( -e.g., [OsmAnd](https://play.google.com/store/apps/details?id=net.osmand)). However, this is rather -slow and does not provide updates while recording. - -The developer documentation is in [README_API.md](README_API.md). - -## Project history - -_OpenTracks_ is based upon Google _My Tracks app_ ([code](https://code.google.com/archive/p/mytracks/)). -_My Tracks_ was initially released by Google in 2010 as [open-source software](http://google-latlong.blogspot.fr/2010/05/code-for-my-tracks-is-now-yours.html). -In 2016, [Google decided to discontinue](https://support.google.com/maps/answer/6333516) _My Tracks_ and stopped distributing it via the Google Play store in April 2016. -Then [Plonk42](https://github.com/plonk42) conducted some maintenance work until 2016, so _My Tracks_ could still be used (based upon version _Google's MyTracks_ version 2.0.6). -Plonk42's version is available [here](https://github.com/Plonk42/mytracks). -In 2019, _OpenTracks_ was forked from Plonk42's _My Tracks_ and major rework was conducted. - -Rework of _OpenTracks_ included: -* removing Google's analytics code, -* removing integration into Google Drive, -* removing Google Maps integration, -* removing Google Earth integration, -* removing use of Google Play service, -* removing calorie estimation and activity estimation, -* removing support for ANT+ and Classic Bluetooth, -* adding support for Bluetooth LE heart rate sensors, -* removing Protobuf (store sensor data in SQLite columns directly), and -* removing Android Service API for other apps. - -Artwork, logos and user interface remained more or less unchanged. - -More information about _Google My Tracks_: -* [Wikipedia page](https://en.wikipedia.org/wiki/MyTracks) -* [Google code archive](https://code.google.com/archive/p/mytracks/) diff --git a/src/main/java/de/dennisguse/opentracks/ui/customRecordingLayout/CsvLayoutUtils.java b/src/main/java/de/dennisguse/opentracks/ui/customRecordingLayout/CsvLayoutUtils.java index a47fb15dc..4e2e2ca45 100644 --- a/src/main/java/de/dennisguse/opentracks/ui/customRecordingLayout/CsvLayoutUtils.java +++ b/src/main/java/de/dennisguse/opentracks/ui/customRecordingLayout/CsvLayoutUtils.java @@ -1,4 +1,4 @@ -package de.dennisguse.opentracks.ui.customRecordingLayout; +package de.dennisguse.opentracks.ui.customrecordinglayout; import androidx.annotation.Nullable; diff --git a/src/main/java/de/dennisguse/opentracks/ui/customRecordingLayout/CustomLayoutFieldType.java b/src/main/java/de/dennisguse/opentracks/ui/customRecordingLayout/CustomLayoutFieldType.java index 6ce0d694c..88a0221f4 100644 --- a/src/main/java/de/dennisguse/opentracks/ui/customRecordingLayout/CustomLayoutFieldType.java +++ b/src/main/java/de/dennisguse/opentracks/ui/customRecordingLayout/CustomLayoutFieldType.java @@ -1,4 +1,4 @@ -package de.dennisguse.opentracks.ui.customRecordingLayout; +package de.dennisguse.opentracks.ui.customrecordinglayout; public enum CustomLayoutFieldType { GENERIC(1), diff --git a/src/main/java/de/dennisguse/opentracks/ui/customRecordingLayout/DataField.java b/src/main/java/de/dennisguse/opentracks/ui/customRecordingLayout/DataField.java index d3c94fb05..99a2a46cd 100644 --- a/src/main/java/de/dennisguse/opentracks/ui/customRecordingLayout/DataField.java +++ b/src/main/java/de/dennisguse/opentracks/ui/customRecordingLayout/DataField.java @@ -1,4 +1,4 @@ -package de.dennisguse.opentracks.ui.customRecordingLayout; +package de.dennisguse.opentracks.ui.customrecordinglayout; import android.os.Parcel; import android.os.Parcelable; diff --git a/src/main/java/de/dennisguse/opentracks/ui/customRecordingLayout/RecordingLayout.java b/src/main/java/de/dennisguse/opentracks/ui/customRecordingLayout/RecordingLayout.java index bc05ffd10..62a23d162 100644 --- a/src/main/java/de/dennisguse/opentracks/ui/customRecordingLayout/RecordingLayout.java +++ b/src/main/java/de/dennisguse/opentracks/ui/customRecordingLayout/RecordingLayout.java @@ -1,4 +1,4 @@ -package de.dennisguse.opentracks.ui.customRecordingLayout; +package de.dennisguse.opentracks.ui.customrecordinglayout; import android.os.Parcel; import android.os.Parcelable; diff --git a/src/main/java/de/dennisguse/opentracks/ui/customRecordingLayout/RecordingLayoutIO.java b/src/main/java/de/dennisguse/opentracks/ui/customRecordingLayout/RecordingLayoutIO.java index 688b46355..bb765f0f8 100644 --- a/src/main/java/de/dennisguse/opentracks/ui/customRecordingLayout/RecordingLayoutIO.java +++ b/src/main/java/de/dennisguse/opentracks/ui/customRecordingLayout/RecordingLayoutIO.java @@ -1,4 +1,4 @@ -package de.dennisguse.opentracks.ui.customRecordingLayout; +package de.dennisguse.opentracks.ui.customrecordinglayout; import android.content.res.Resources; import android.util.Log; diff --git a/src/main/java/de/dennisguse/opentracks/ui/customRecordingLayout/SettingsCustomLayoutEditAdapter.java b/src/main/java/de/dennisguse/opentracks/ui/customRecordingLayout/SettingsCustomLayoutEditAdapter.java index ec85fc469..8a6a6b5df 100644 --- a/src/main/java/de/dennisguse/opentracks/ui/customRecordingLayout/SettingsCustomLayoutEditAdapter.java +++ b/src/main/java/de/dennisguse/opentracks/ui/customRecordingLayout/SettingsCustomLayoutEditAdapter.java @@ -1,4 +1,4 @@ -package de.dennisguse.opentracks.ui.customRecordingLayout; +package de.dennisguse.opentracks.ui.customrecordinglayout; import android.content.Context; import android.util.Log; diff --git a/src/main/java/de/dennisguse/opentracks/ui/customRecordingLayout/SettingsCustomLayoutListAdapter.java b/src/main/java/de/dennisguse/opentracks/ui/customRecordingLayout/SettingsCustomLayoutListAdapter.java index 8fbcf628e..df626468c 100644 --- a/src/main/java/de/dennisguse/opentracks/ui/customRecordingLayout/SettingsCustomLayoutListAdapter.java +++ b/src/main/java/de/dennisguse/opentracks/ui/customRecordingLayout/SettingsCustomLayoutListAdapter.java @@ -1,4 +1,4 @@ -package de.dennisguse.opentracks.ui.customRecordingLayout; +package de.dennisguse.opentracks.ui.customrecordinglayout; import android.content.Context; import android.view.LayoutInflater; diff --git a/src/main/java/de/dennisguse/opentracks/ui/intervals/IntervalStatistics.java b/src/main/java/de/dennisguse/opentracks/ui/intervals/IntervalStatistics.java index cbb07bd06..6f685f705 100644 --- a/src/main/java/de/dennisguse/opentracks/ui/intervals/IntervalStatistics.java +++ b/src/main/java/de/dennisguse/opentracks/ui/intervals/IntervalStatistics.java @@ -18,7 +18,11 @@ public class IntervalStatistics { private TrackStatisticsUpdater trackStatisticsUpdater = new TrackStatisticsUpdater(); private final List intervalList; private final Distance distanceInterval; - private Interval interval, lastInterval; + + + private Interval interval; + + private Interval lastInterval; /** * @param distanceInterval distance of every interval. diff --git a/src/main/java/de/dennisguse/opentracks/ui/markers/MarkerDetailActivity.java b/src/main/java/de/dennisguse/opentracks/ui/markers/MarkerDetailActivity.java index 431eadf27..f504511ee 100644 --- a/src/main/java/de/dennisguse/opentracks/ui/markers/MarkerDetailActivity.java +++ b/src/main/java/de/dennisguse/opentracks/ui/markers/MarkerDetailActivity.java @@ -60,10 +60,7 @@ protected void onCreate(Bundle bundle) { super.onCreate(bundle); Object bundleMarkerId = getIntent().getExtras().get(EXTRA_MARKER_ID); - Marker.Id markerId = null; - if (bundleMarkerId instanceof Marker.Id) { - markerId = (Marker.Id) bundleMarkerId; - } + Marker.Id markerId = (bundleMarkerId instanceof Marker.Id markerId) ? (Marker.Id) bundleMarkerId : null; if (bundleMarkerId instanceof Long) { //Incoming Intent via Dashboard API. markerId = new Marker.Id((Long) bundleMarkerId); diff --git a/src/main/java/de/dennisguse/opentracks/ui/markers/MarkerDetailFragment.java b/src/main/java/de/dennisguse/opentracks/ui/markers/MarkerDetailFragment.java index 9467aa9d5..fbc6a6590 100644 --- a/src/main/java/de/dennisguse/opentracks/ui/markers/MarkerDetailFragment.java +++ b/src/main/java/de/dennisguse/opentracks/ui/markers/MarkerDetailFragment.java @@ -75,12 +75,14 @@ public void run() { @Override public void onAnimationStart(Animation anim) { - } + // This method intentionally left empty as the onStart animation behavior is not required. - @Override - public void onAnimationRepeat(Animation anim) { + throw new UnsupportedOperationException("onAnimationStart is not supported for this class."); } + + + @Override public void onAnimationEnd(Animation anim) { viewBinding.markerDetailMarkerTextGradient.setVisibility(View.GONE); diff --git a/src/main/java/de/dennisguse/opentracks/ui/markers/MarkerListAdapter.java b/src/main/java/de/dennisguse/opentracks/ui/markers/MarkerListAdapter.java index f02a65126..b039d8e49 100644 --- a/src/main/java/de/dennisguse/opentracks/ui/markers/MarkerListAdapter.java +++ b/src/main/java/de/dennisguse/opentracks/ui/markers/MarkerListAdapter.java @@ -242,9 +242,8 @@ public boolean onLongClick(View view) { setSelected(true); return true; } - } - /** + /** * It loads the photoUrl in the imageView from view. * It takes the photo from cache or from storage if isn't in the cache. * @@ -273,4 +272,7 @@ private void asyncLoadPhoto(ImageView imageView, Uri photoUri, Marker.Id id) { } }); } + } + + } diff --git a/src/main/java/de/dennisguse/opentracks/ui/util/RecyclerViewSwipeDeleteCallback.java b/src/main/java/de/dennisguse/opentracks/ui/util/RecyclerViewSwipeDeleteCallback.java index ab1c54f0a..ff6cddae3 100644 --- a/src/main/java/de/dennisguse/opentracks/ui/util/RecyclerViewSwipeDeleteCallback.java +++ b/src/main/java/de/dennisguse/opentracks/ui/util/RecyclerViewSwipeDeleteCallback.java @@ -25,7 +25,7 @@ public abstract class RecyclerViewSwipeDeleteCallback extends ItemTouchHelper.Ca private final int intrinsicWidth; private final int intrinsicHeight; - public RecyclerViewSwipeDeleteCallback(Context context) { + protected RecyclerViewSwipeDeleteCallback(Context context) { background = new ColorDrawable(); backgroundColor = ContextCompat.getColor(context, R.color.colorBackgroundDelete); clearPaint = new Paint();