Skip to content
This repository has been archived by the owner on Oct 7, 2019. It is now read-only.

Support for virtual runs #17

Open
marcoalt opened this issue May 4, 2018 · 20 comments
Open

Support for virtual runs #17

marcoalt opened this issue May 4, 2018 · 20 comments
Assignees

Comments

@marcoalt
Copy link

marcoalt commented May 4, 2018

hi there, it seems virtual runs are not supported (the type is not listed in the model folder of the library, under activitytype). When reading a virtual run, it is reported as virtual ride from the library. Any chance this can be extended? Thank you.

@truizlop
Copy link
Contributor

truizlop commented May 4, 2018

Can you provide a source in Strava docs where they state they support this in their API? If so, I'll be happy to include it.

@marcoalt
Copy link
Author

marcoalt commented May 4, 2018

thank you for the quick reply. Indeed their APIs are not updated, however the activity type is supported (can be selected as manual activity, and is automatically selected when using a third party app like Zwift). In any case it would be useful if the virtual run would be read by the library as run (if not as virtual run), because it does not make sense that it becomes a ride. I hope this clarifies, thank you.

p.s. I can for example use the type correctly using the library I use on iOS, but not using this library on Android (so the type is supported on their end, despite the lack of documentation unfortunately)

@truizlop
Copy link
Contributor

truizlop commented May 4, 2018

Do you have an example of a JSON response that includes a virtual run? Or can you point out the library you are using on iOS that handles this properly?

@marcoalt
Copy link
Author

marcoalt commented May 4, 2018

I use this library: https://github.com/sebastienwindal/FRDStravaClient which works despite not being updated in 4 years, it could be that they simply 'carry the activity type' instead of forcing a match to some pre-defined categories. Makes sense?

To reproduce this you could simply go on Strava and create a manual activity, of type Virtual Run (no need to have an actual activity file), then read it with your library. When I do so, I end up with a Ride, let me know if you cannot reproduce the problem, and I'll try to dig a little more, thanks again for your help.

@truizlop
Copy link
Contributor

truizlop commented May 7, 2018

When you read the type field on the iOS library, what is the String value for the virtual run? Is is VirtualRun?

@marcoalt
Copy link
Author

marcoalt commented May 7, 2018 via email

@truizlop
Copy link
Contributor

truizlop commented May 7, 2018

Ok, I've updated the library to version 1.3.1 with this activity type. I think that will work, but let me know if it doesn't. Close the issue when you check it out. Thanks!

@marcoalt
Copy link
Author

marcoalt commented May 7, 2018 via email

@marcoalt
Copy link
Author

marcoalt commented May 7, 2018 via email

@truizlop
Copy link
Contributor

truizlop commented May 7, 2018

I had to change build tools and some other things in gradle. Can you post your build tools, target sdk number, etc? I can then configure a project with your settings and see what's going on

@marcoalt
Copy link
Author

marcoalt commented May 7, 2018 via email

@marcoalt
Copy link
Author

just FYI I was using 1.0.2. without issues and the same applies to the latest versions before this one (1.2 and 1.3), but I can't seem to get 1.3.1 to work.

@truizlop
Copy link
Contributor

Which version of Gradle for Android are you using? I updated it to 3.1.1 in the last release. I've tested it with the sample project, compile and target SDKs to 26, build tools 27.0.3 (minimum supported for the gradle version I'm using) and it works correctly.

@marcoalt
Copy link
Author

marcoalt commented May 10, 2018 via email

@truizlop
Copy link
Contributor

It seems that might be the issue. Is it possible for you to update it to the latest version? Otherwise, could you paste the specific error you are getting?

@truizlop truizlop self-assigned this May 10, 2018
@marcoalt
Copy link
Author

marcoalt commented May 10, 2018 via email

@marcoalt
Copy link
Author

marcoalt commented May 10, 2018 via email

@truizlop
Copy link
Contributor

Great to hear that and sorry for all the inconveniences; I hope you can make good use of the library. Just in case, as you mentioned you were using another library for iOS, we have an implementation of this library in Swift, with a very similar API, that you can find here. Please, close the issue when you think it's done.

@marcoalt
Copy link
Author

marcoalt commented May 10, 2018 via email

@marcoalt
Copy link
Author

marcoalt commented Nov 13, 2018 via email

Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants