jonasoreland / runnerup

A open source run tracker
GNU General Public License v3.0
753 stars 275 forks source link

.tcx file is empty (0KB) for manual activities (no gps data) #1105

Closed Hirutenshi closed 2 years ago

Hirutenshi commented 2 years ago

Sharing or downloading (to file) a manually added activity (without any gps tracking data) creates an empty (0KB) tcx file.

knarrff commented 2 years ago

I confirm that the exported TCX file is empty for a manually created activity, while the same for GPX is not and TCX is also not empty if the activity contains track data (was not manually created).

gerhardol commented 2 years ago

RU is is only designed to be used with GPS. Similar, recording is noly done when GPS is updated. Manual registration of activities is only implemented really for the local history.

knarrff commented 2 years ago

I can't see why exporting the metadata should not work in principle. It does for GPX, and that code looks similar in nature. I don't have time right now to look into the issue. Given the zero bytes despite the assignment of the general metadata initially in the exporter I suspect an exception somewhere in that code, leaving the "share" with an empty file instead of one with at least the manually created metadata in it.

RU is is only designed to be used with GPS.

I agree that using RU essentially as a glorified stop watch isn't the main intention. However, why not? There might be users with reasons they find valid. One of them could be that sometimes GPS recording just does not work or not work well. Or you simply forgot your phone but want to have at least the distance/time data all in one place: RU on your phone, so you add the data manually. Later you might want to export all data. So, with manual entries existing, why shouldn't you be able to export them as well.

gerhardol commented 2 years ago

As the intention (before I was involved) was just GPS, this was just not implemented, can for sure be done. No GPS is just not implemented.

Hirutenshi commented 2 years ago

I agree that using RU essentially as a glorified stop watch isn't the main intention. However, why not? There might be users with reasons they find valid. One of them could be that sometimes GPS recording just does not work or not work well. Or you simply forgot your phone but want to have at least the distance/time data all in one place: RU on your phone, so you add the data manually. Later you might want to export all data. So, with manual entries existing, why shouldn't you be able to export them as well.

For the past 2 years I have tracked all my running, biking, hiking and rowing activities using RU. Having all my activities in one app is a wonderful thing. Since I use a rowing machine there is no gps tracking for these activities. It never occured to me that this might be a problem if I ever intend to export my activities.

If you decide that this is not a desired feature a short warning to inform users about this behaviour would be helpful.

gerhardol commented 2 years ago

It is a desired feature, just not something intended initially. If the app is used this way now, it should be added. There is no intention to lock-in to the app. Similar for custom activities (could be user defined to avoid translation issues). Patches are welcome.

Hirutenshi commented 2 years ago

Found a misplaced endTag which only matter when an activity without Trackpoints is exported. Changing this one line seems to fix the problem for me and leads to tcx files with correct metadata.