Hi all,
I develop a Strava App which aims to show a list of the recent Strava activities and you have the option of merging two or more activities selected from the list.
I see it as being very useful, for me of course, as I usually do a morning commute to work, lunch run, evening commute back home - all recorded with my watch. Since I cannot pause my bike activity to start a run, then later resume the bike activity (would be a nice feature btw - to allow multiple paused activities based on type), I want in the evening to be able to merge my 2 commute activities into one.
Algorithm I use for merging is plain simple - just aggregate all points from all activities, sorted by date.
Everything is in place and working locally, however I have reached a dead lock:
- my initial plan was to download original activities (as GPX) and delete the activities-to-be merged; however this is not possible as there’s no way of deleting an activity via the Strava API; the the upload of the merged activity will follow
- since I cannot delete, I try the upload of the merged even if its parts are on Strava; upload basically enqueues the track then polls for this upload status; not much to my surprise, upload fails after a while with "There was an error processing your activity." and “… duplicate of ...”. Basically upload fails as it found that there is an activity starting around the starting date of my new-to-merge activity’s start time (which of course I set at starting time of first activity to be merged)
Question is - how can I - via the Strava API - be able to get over this dead lock? I cannot upload due to an existing activity and in the meantime I cannot remove that activity.
Best regards,
