New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
runtastic import #89
Comments
is there any API documentation ? /Jonas On Tue, Aug 5, 2014 at 2:14 AM, David Hilton notifications@github.com
|
Web programming isn't exactly my thing, but I would like to see this feature added :). I haven't found any public documentation; here's what I have so far for authentication:
I'm botching the form submission somehow. |
post for authentication: post for activity submission: |
There are 2 additional authentication methods; facebook and google oath2. |
Hi! Great work!! I'm currently experimenting with it and I get the authentication to work I do "curl -v -v Have you seen this ? /Jonas ps. currently only experimenting with curl...once that works I'll do it in On Wed, Aug 13, 2014 at 5:01 PM, David Hilton notifications@github.com
|
I was also using curl, but then figured out firebug a bit better; I've not replicated what they do... could you post the curl you're using to login as well? I think the issue may involve cookies; 'curl -c cookiejar -b cookiejar ....' might work... We could also try sending the file with --data-binary or --data-urlencode... |
i've tried a bunch of different variants without getting it to work... have you gotten it to work somehow ? /Jonas On Wed, Aug 20, 2014 at 6:52 PM, David Hilton notifications@github.com
|
I learned how to get the info from firebug: |
Ok, got one step further: URL="https://www.runtastic.com/import/upload_session?authenticity_token=${TOKEN}" Now I get back success, but I need to choose sport to... /Jonas |
upload_session will return json:
sport_type 1 is Running, 3 is Cycling (19 is Walking). POST to: https://www.runtastic.com/import/update_sport_type authenticity_token=$TOKEN |
It would be good to also run the 'refine elevation command', something like: |
hmm...don't know where to get the user_id |
You can get it here: "https://www.runtastic.com/en/users/"+ slug+"/import" In the source code of the page there is an array like this: var user = {"id":XXXXXXXX, ...} I'm currently finishing my master thesis which is based on syncing sport data between different servers. I'm developing it in Android, but right now I'm testing it in Java with Apache HttpClient library, so I have all the functions if you need some help. PS: About Endomondo, I can remove Workouts from the server if you need it. Maybe we can work together on this. |
Hi jl1990 Thx for hint, I'll look into to that method... /Jonas |
Hi again, I've just tried this: GET on "https://www.runtastic.com/en/users/import?authenticity_token=${TOKEN}" |
Ok, I got it working some days ago. I just uploaded the code to github. Take a look at this class: Edit: I finally decided to use Apache HttpClient library. It just simplify the work too much. |
Great! A question: are all the arguments really needed ?? Sending User-agent: Mozilla/5.0 seems a bit silly. /Jonas |
No, just some of them are mandatory. But I didn't try to remove any of them. As it didn't work in the beginning (I think it was X-NewRelicID or some non-typical HTTP parameter), I tried to mimic the web navigator response to make it work, and it did. |
Update: committed runtastic uploader. After my upload_session i get success back...back nothing shows on the site. |
Check cookies too, you have to mantain the session. I used Apache HttpClient because of that. You must mimic almost exactly the behaviour of a web browser or it won't work. Hope it helps edit: My code is working, if you have any doubt just ask (I know my code needs some cleaning but... I had to make it work and it wasn't easy). |
indeed! with cookie it actually worked!! |
Sports type is always set to running (1); we should set this to biking (3), when appropriate. |
correct!! (i forgot)... so I did this.
On Sat, Oct 11, 2014 at 12:31 AM, David Hilton notifications@github.com
|
I tried to export an activity from Runnerup running on my old phone (using share/export or something) and then import it in my new phone (by using 'open with Runnerup from the file manager), in both gpx and tcx file formats, but in both cases the app said 'failed to import'. Is this related to the issue here? I am using v2.6.0.2, which is the latest version. I remember I was able to do it once before in what is probably an older version. Has something broken in the new version, or am I simply doing it wrong? |
There has been very minimal changes to .tcx and no changes I can think of for .gpx the last two years or so. Compare to #1161 where Strava requires their own format to support importing cadence. |
And the built-in uploader to Runtastic was removed some years ago, Runtastic removed support. |
Okay, sorry, I didn't even know what runtastic was until now, I should have googled it before posting. I thought it might have been the old name for Runnerup (Google Bard mislead me). I'm not using any third party apps. My problem is exporting from Runnerup and importing back to Runnerup. It's giving import failed regardless of whether it's done on the same phone or a different one. |
Maintenance RU can import workouts, not activities |
I already tried export and import database, but how do I copy the sqlite file into my other phone? It stores into an area that cannot be accessed i.e /Android/data/* , at least not without root. |
Android have scooped storage, so this is what normal apps can access. |
Thanks, I got Amaze from F-droid, and I can access the database. I'm wondering if it's possible to do a sync with WebDAV connection as well? I logged into my Nextcloud with Runnerup on both phones, and didn't see anything getting synced in history. PS: I had a look at the wiki, and saw upload 'OK' and Download blank for WebDAV, so assume it won't work ( https://github.com/jonasoreland/runnerup/wiki/Synchronization-with-external-providers ). Is this a feature that is planned at all? |
You can upload gpx/tcx to WebDAV
Download is not planned (by me, but someone else may contribute it). |
I've done some preliminary looking into runtastic imports (manually uploading an exported tcx and gpx), and the tcx data successfully imported pauses, while the gpx file didn't.
After authentication, the file is uploaded here: https://www.runtastic.com/import/upload_session (I get {"error":"Uploading failed"} when accessing the url directly)
The text was updated successfully, but these errors were encountered: