Strava Viewer for Windows Phone

Strava Viewer for WP7

Strava Viewer for WP7

Update: Source code now available on CodePlex.

Update: See http://veloviewer.com for latest info.

Update: Info on WP7 GPS recording for Strava: see esfuerza a Strava recorder and uploader for Windows Phone.

Update: “Chaser” another Strava ride/run recorder now available.

A bit of a side project to my normal work here at Tribal Labs but building a Strava app for the Windows Phone has been a fantastic learning experience touching on many of the key features of mobile development. I’m fairly new to Strava having recently been introduced to it by one of the guys at my cycling club and now I’m pretty much addicted! It ticks all my excite boxes of cycling, mobile technologies, data visualisation and a healthy slice of competition.  For those of you who haven’t heard of it “Strava lets athletes all over the world experience social fitness—sharing, comparing and competing with each other’s personal fitness data via mobile and online apps”.

It does many things very well but there are definitely some gaps in functionality and device support so time to step up and plug some of those holes with a Windows Phone app.

Details and video on the flip…

What is Strava?

Strava Full Ride Details

Ride details (logged in view)

The best way to see what Strava gives you above and beyond the out-the-box GPS stats package is by looking at a ride details page like this one of mine. If you look at the elevation profile you’ll notice lots of green sections highlighted which are user-created “segments”, typically marking out climbs. Discussing various stats on these segments has now become the prime topic of conversation on our ride’s café stops and is the standout feature of Strava. If you ride a hill that doesn’t currently have a segment then any user can create it and after a couple of hours Strava will have populated a leader board for all the rides in its database that included that particular climb. If you are logged in then you get to see far more detailed information and can drill down into the segment leader boards and other people’s rides along with many other features.

Current Strava shortcomings

It’s not all roses though. When you upload a ride then that ride’s segment stats are seemingly set in stone even if subsequent users upload rides that alter your segment placing.  There is no kind of notification should you be knocked off from the hard fought for segment podium position or top spot (KOM – King Of the Mountain). You can only view a list of your KOM’s (segments where you are in 1st position), there’s no overview of all your segment placings which is a bit limiting to those without a number of 1st places.  Also, currently Strava doesn’t provide a Windows Phone app but I can let them off with that, for now, particularly when it’s so easy to build your own. So my main drivers for this Windows Phone app were to:

  • Provide alerts when position on segments change
  • Provide a view of all segment placings
  • Provide up-to-date segment stats on rides
  • Find newly created segments
  • Get Strava into a Windows Phone app

Note: seeing as I use a GPS device for my rides I am not bothered about trying to record rides in this app. Here’s a video of my progress so far:

How it works

First off Strava provide documentation for a number of their older API’s although a quick Fiddler while using their website shows that there are a number of V3 API’s being used that we can also hook in to. It is surprising how many of these API’s are available without having to use any authentication. I was returning all ride and segment info and leader boards back fine and in fact, currently I only need to authenticate to bring back my ride’s map data. I cache all the ride, segment, leader board and map data in Isolated Storage on the device which allows me to view my data when out of mobile signal (which is often the case at our Peak District café stops). It also allows for a fairly fast start up time as it pulls the data out of a file and lazy loads the maps and leader board data as required.  An object model is populated from the cache (and/or web service calls) and using a simple MVVMmodel I easily databind up to a XAML front end which allows for a very flexible UI that probably stills needs a bit more flexing.

Strava Alerts

Alerts

Storing this cache also allows us to achieve our main objective and raise alerts when segment placings change. It isn’t the quickest process to run as it needs to get the latest leader board for each segment and then check that off against each segment’s leader board in the object model. Currently it takes about a minute to perform this check for my 180 or so segments but half that time is taken loading and saving data from/to isolated storage which I’ll have to look into. I’m using the Bing Maps control but using the excellent Open Cycle Map layer in order to show contour lines. Very easy to do once you’ve found the right blog post telling you what to do.

Future

Very much work in progress but this definitely plugs a few holes in my own Strava experience. If I get much interest in this then I’ll put it up on CodePlex for others to use and who knows, if some proper coders can sort out my dodgy C# then it could make its way to the Windows Phone Marketplace!

Also possibilities with other technologies which support caching (e.g. browser apps, or Windows 8 Metro apps which could cache on the cloud to give alerts on any device, even when moving between devices…)

Follow me on Twitter

LinkedInShare

About Ben Lowe

Ben has been involved in designing and implementing systems in the education sector specialising in facilitating complex processes, actions and data visualisations in intuitive and targeted solutions that optimise the users’ productivity and experience. Follow Ben on Twitter.
This entry was posted in Data Visualisation, Mobile Technology, Open Data, Projects and tagged , , , , , . Bookmark the permalink.
  • http://twitter.com/dominicwatts Dominic Watts

    Really fantastic Ben, I want this on my Windows Phone now!

  • Cougarwa

    Ben, keep working on the strava viewer !  I’ll buy it

  • Philip Sloan

    Looks Very Cool.  I’ve just started working on some development for windows phone too.  I’d love to help, either by testing or coding.  :)

  • Pete3

    I want!  How do I get this? 
    Good effort with the project, nice to see support for WP7.

  • http://twitter.com/Ben_Lowe Ben Lowe, UK

    Hi Pete3. Check out http://stravaviewer.com for the progression to this. 

  • http://pulse.yahoo.com/_7WRLINOQBPDIMDN4CY6BDLWZFI Thomas

    WP7 needs this app badly! I would buy immediately! Thanks for the great work. Can’t wait to see the final app released.

  • Frenk

    This is wonderful! I’m a Strava user and c#/wp7 developer. Is there any chance to try the xap on my device and maybe contribute to the codebase?

    • http://twitter.com/Ben_Lowe Ben Lowe, UK

      Hi Frenk,
      I’ve just stuck the source code fro this up on CodePlex: https://stravaviewerwp7.codeplex.com/ You’re welcome to contribute, it’s in need of a bunch of input to make it robust.  Ideally could do with a new API from Strava (which is in the pipeline but a fair way down it) to return all segments for an Athlete.
      Ben

  • http://twitter.com/CarlCobon Carl Cobon

    Any chance you can port this to BlackBerry?

    • ben_lowe

      (Spills drink) you’re joking right? The code is in codeplex if you want to give it a go :-)

  • Greg Thomton

    So, how close is this? Weeks? Months?
    Do Strava user know of any current GPS app that will plug into Strava?

    • ben_lowe

      My limited evening coding efforts are going into the website mentioned at the top of the post so I’m afraid this app has stalled. There are a number of GPX logging applications in the marketplace which you can export the GPX files from and upload to Strava. In my opinion the better option is just stump up £100 and get a Garmin 110. Almost all of my Strava chums that use their phones to record their rides have their batteries run out on them almost every other ride.

      • Greg Thomton

        Thanks for feedback…..and keep up the good work. :)

        I got BikeBlackBox figured out, and so far it is working. Has a nice Skydrive upload feature, so only a couple steps to get into Strava.

        I don’t track everything, just go hit a couple key strava sections near my house, so battery hasn’t been an issue yet.

  • http://twitter.com/martinalex Martin Rosas

    Great job. Question: Any idea how to pull the full leader board of a particular segment? I’m able to see the first 50 but I can’t access the rest even with the offset flag available for other searches like rides by athlete. Any experience with this ? Thanks Martin. @martinalex

    • ben_lowe

      I’m afraid that option on Strava’s segment efforts API doesn’t seem to work. That is why on my website I only can give positions in the top 50. The alternative would be to get all the efforts (using offset but without best=true) and calculate the full leaderboard. If you Google enough you’ll find a number of others running into the same problem. You can raise it with Strava via their support page but I don’t think they are fixing v2 issues any more. Fingers crossed their V3 api’s will provide what you need next year.

      • http://twitter.com/martinalex Martin Rosas

        It seems I hit a wall on this one. Everywhere I go I get the same answer. I’m afraid I’m going to have to build the full leader board myself. Thanks for your help and keep up the good work. Great tool. Martin.