ConnectStats

Description

ConnectStats is an activity viewer for Garmin Connect. It lets you review your activities, search, analysis, plot and see basic statistics on all your data collected in garmin connect from your iphone or ipad. You can read some of the motivation behind the app here or check the blog

This app is open source on github

Features

  • Detailled report on your activities, with
    laps break down, map gradient, graphs and statistics
  • Use gradient color to visually see on the map your heart rate, speed, power or cadence
  • Calendar view of your activities
  • Activity search
  • Monthly/Weekly summary statistics of your activities
  • Year to date or Month to date statistics
  • Monthly/Weekly/Detailled Historical report and graphs on any collected data
  • Display scatter plots, trend lines for both historical and track data.
  • Best Rolling Plots, histograms.
  • Support multiple garmin connect account simultaneously with multiple profiles.
  • Support most activity types, including support for lap swimming, ski, run bike, …
  • Display the location name for your activities.
  • Derived metrics (stride length, Power kJ,…),
  • Calculated and auto laps for arbitrary distances or time. Let’s you see you split time or distance, fastest km, etc
  • Display time in zone for power and heart rate. Zones are downloaded from garmin connect.
  • Best Rolling plots and lap for HR, pace and power (Critical Power Plot), including running power (from Stryd or other devices)
  • This app can import information from your Health Data like the weight to add it to the analysis of your fitness

Goal of the Program

  • First Goal is to provide convenient and full access to all our data from your mobile device.
  • Second Goal is to implement all type of advanced analysis on your data that I couldn’t find in other programs
  • The app was tested with data from forerunner, garminswim, garmin edge, garmin fenix and garmin fit app.
  • It’s intended to handle large numbers of activities (tested with several thousands activities and with activities up to 6h long). For such large archives the initial download can be a bit long, especially if you have an older phone.
  • The app will not let you record any activities, but only display data uploaded from Garmin Connect.

Fist Use

  • when you start the program you will be have to choose and enable download for the service of your choice.
    • Garmin: you can choose the connectstats service, which will pop up a login message or to download from the website in which case you will have to enter your user name and password.
    • Strava: upon first refresh, the strava login page will popup.
  • the app will then start downloading activities when you  refresh by pulling down on the activity list
  • Note that this process can be quite slow if you have a lot of activities. Note that in addition if you use the ConnectStats service for Garmin, the very first time will required a synchronisation that can take some time.
  • You can interrupt the process at any time and it will restart where it left it when you restart the app and start refreshing.
  • While it’s downloading you should be able to look at already downloaded activities but the performance will be slower than after full download completed. If any error occur during that process restart the app and it should restart the download where it left of.
  • If you have issue connecting check the trouble shooting section

How to use it

  • You can refresh by pulling down the activity list
  • You can navigate the different tabs and touching most data will let you drill down on that number.
  • You can touch a graph or the gear button to rotate through the different graphs options or bring in the graph full screen.
  • You can reload an activity to update changes in garmin connect by pulling down on the detail tab
  • You can see full history of any field by selecting the field name in the stats page
  • You can drag to the right the detail view to reveal the sharing page for Google earth or facebook/tweater sharing
  • You can tap the name of an activity to rename it. This will rename it also on Garmin Connect.
  • If an activity was deleted on garmin connect, select it in the app and pull down to refresh. It will then delete it from the app.
  • If you setup the withings service in the settings page, you should see in the details page the closest weight to that date and in the stats an extra scatter plot versus your weight. Currently to refresh you’ll have to go back to the settings page and press refresh. More graphs, auto refresh, etc will be added in later versions.
  • You can setup strava synchronization. In that case any activity you display in the detail pane will automatically be synchronized to strava

Disclaimer & Acknowledgements

  • This app is not associated in any way, shape or form to Garmin. I am just an independent hobbyist who built this mostly for myself and making it available to others. This is using internet services provided by garmin which display the following license.
  • Withings is a registered trademark and service mark of Withings, Inc. ConnectStats is designed for use with the Withings platform. This product is not put out by Withings, and Withings does not service or warrant the functionality of this product.
  • The icons were bought form shutterstock and glyphish
  • If I did something inappropriate please let me know and I’ll correct it.

Known Issues

  • Some users initial login fails despite correct name/pwd – investigating, work around seems to uninstall/reinstall the app
  • Rename an activity will failed if you use non standard characters
  • Speed and Pace graph in the details window are identifcal – fixing

If you have a crash or issues with some activities you can send a bug report from the settings tab

  • Straight up excellent ★★★★★
    I don’t write many reviews but ConnectStats deserves one. I use Garmin connect and Strava but to compare volume and count ConneftStats is simpler and superior. It takes Garmin and/or Strava data directly and although the display appears basic, they are highly detailed and comprehensive. It will give you more detail and more insightful information about your exercise than the other app but it isn’t a replacement to them. It’s not replacing strava or Garmin Connect. I love this app and would suffer less understanding about my workouts without it
    By Lives in Houston for Version 5.0.2
  • Valuable app ★★★★★
    Provides unique stats and graphics not available elsewhere. For example plots pace vs heart rate or cadence. A tremendous bargain. My favorite ios and data analytics app.
    By JackP2016 for Version 5.0.2
  • Excellent App ★★★★★
    This program lets you sort through your data and view either big picture (many years) or details with ease. The visualizations are in some ways more useful and give you a good view of your progress. A very nice addition to the standard Garmin or Strava visualizations and the author has kept it up to date.
    By UP Snowblower for Version 5.0.2
  • Open source! ★★★★★
    Great software, and it's open source so if i don't like something you can fix it yourself theoretically.
    By DarrinC for Version 5.0.2
  • Awesome!!! ★★★★★
    I have used this app for years. I hope Garmin never stops sharing the data, as this app does it all for me. As of today, Aug 9, 2016 it still works with Garmin. Keep up the good work, and. Thank you for regular updates. Live on forever!! 🙂
    By Malibu3105 for Version 4.7
  • Great running App ★★★★★
    I use this app daily and have been for over 5 years. Great tool to analyze your runs.
    By Kyojin42 for Version 4.6.1
  • Still Better Than Garmin’s App ★★★★★
    This remains my favorite running app ever. I’ve used it for 7 years and 11 marathon training routines. The graphs and aggregated stats are easy to see, scrolling through to find past runs is much easier than other apps. It remains the best out there!
    By Patcalhob for Version 4.6.1
  • Just about all the stats you could hope for ★★★★★
    This really is a great app. Is it a beautiful example of modern app design? No. Does it provide all the stats a fitness nerd could hope to extract from his or her data? Absolutely.
    By Infinite Waterbear for Version 4.5
  • Great app ★★★★★
    Almost think it’s better than Garmin Connect. Certainly works all the time — can’t say that about Garmin Connect.
    By Roger Wedtphart for Version 4.5
  • Excellent app ★★★★★
    ConnectStats is seriously good and a must have for runners. Highly recommended
    By Inakira7 for Version 4.5

Recent Posts

Data Privacy in ConnectStats

I recently saw a negative review on the App Store for ConnectStats warning users that ConnectStats is not a Garmin app and therefore people should avoid giving away login information in the app as the data may get stolen.

Keeping data secure both on your phone or online has been a key guiding principle in how I tried to implement the app. So while I understand the concern, I felt it was a bit unfair.

I have been careful to make sure the data isn’t shared and the passwords are never sent to me. I also made the app open source so that people can check for themselves what it is doing.

I felt it may be worth to write a bit of details on what is ConnectStats doing with your data and password, with link to the code. So people can either let me know if I miss something or feel better about using the app.

Your login information

Garmin Website service

The app can connect directly to the Garmin website to retrieve information. In order to do that it needs to have access and store your username and password. To do that it stores the password in the keychain of your phone and never locally in a way someone looking at the files saved from connectstats could retrieve. It then relies on the iPhone keychain mechanism which Apple can ensure is secure. The key file to look at to see how it’s done is GCAppPasswordManager.

Strava and Withings services

For the Strava and Withings service, the authentication process uses the OAuth 2.0 so the password is never even seen by ConnectStats. The library I use to manage the OAuth 2.0 is provided by Google , and you can see in the file used by connectstats how the tokens are retrieved from the keychain in this file for Strava for example via this call:

ConnectStats service

ConnectStats also maintains a service that can receive the fit file from the new Garmin Health API. In that case the the authentication is done via OAuth 1.0a. So the passwords are never seen by ConnectStats or its web server, but only tokens are exchanged with Garmin. These tokens are then saved into the keychain of your phone as well as on the database in the server. Note that the server is open sourced as well. While the server is open sourced, the configuration files containing the database passwords and other secret keys are only saved on the server and not in the code. The website is hosted on Godaddy, a reputable company, and I rely on their security to make sure the access to the website is secured.

Your Activities Data

On the phone

Your activity data is kept on the phone and stored locally. So it will be as secure as you keep your phone. You can also see that if you try to run the app in airplane mode all the browsing of statistics and downloaded data will work. Of course you need a connection to download new data…

On connectstats server

With the new Garmin Health API service, ConnectStats needs to maintain a database in a server containing your activities. This is the case if you choose in the app Garmin as a service and source to be All or ConnectStats. If you choose Garmin WebSite only then the data will be accessed directly from the Garmin servers. Note that this is not the officially supported method from Garmin, can and has been subject to outage in the past due to undocumented changes to their website.

If the data is stored on the ConnectStats server, the access to that data is done via an OAuth 1.0 process. Both the app and the server keep a secret token, and use that to do the authentication. The tokens are provided by Garmin, so in order to access your data you will need to do a successful login on the Garmin service and obtain the token this way.

ConnectStats does not maintain any types of user name or its own passwords/user system, which means the data stored on the server can not be traced back to you. Everything is linked and identified by the sha1 hash tokens obtained by Garmin, which look something like this aaf4c61ddcc5e8a2dabede0f3b482cd9aea9434d.

The only person with access to the database with your data is myself, and no one else helps me or has access to the login information. If that ever changes, I’ll make sure to talk about it in this blog.

Note that if you use the source for Garmin data to be both the website AND connectstats service (what I recommend), you will need to enter your login details in the app (as in the Garmin website section), but that data will stay on your phone in your keychain. It will never be uploaded to the connectstats server. So on the server it will still be impossible to link the data saved in the database to your Garmin user account, email or username as well.

Bug Reports

When you send a bug report, this will send the log information, which will look something like the below. This is mostly information that helps me see what has happened and try to understand the problems. You can see in the code everything that is logged by looking for calls to the function RZLog. No sensitive information, like password is logged.

You can choose before sending a bug report to include activities. If this is selected in addition the log above, the internal database of activities saved on your phone is sent as well. This contains all the high level data (distance, heart rate, timings, etc) that allows reconstruction of the statistics page. In addition it will include all the details of the currently selected activity in the detail page (only one full detailed activity). These details contains all the gps points.

Because when you send a bug report, I ask for an email address so I can reply to you, in this case that data could be traced back to an individual with that email. But as mentioned before, I am the only one that receive that email or have access to the files where they are saved on my server. This by the way is the same server hosted by GoDaddy where I have host all the data for ConnectStats.

Conclusion

I hope this will relieve any concerns any one could have about privacy of their data in ConnectStats.

Happy to answer any more questions, and of course if anyone finds holes or gap in how I implemented ConnectStats, feel free to reach out either by comment below or via email or GitHub issue.

  1. ConnectStats Winter Sports Edition Leave a reply
  2. A few app updates 3 Replies
  3. Learning from Services Woes 1 Reply
  4. Getting the weather for an activity in ConnectStats Leave a reply
  5. New services and Withings working again 4 Replies
  6. New Service not working well 5 Replies
  7. Dark Mode and New Service 1 Reply
  8. Preview of dark mode for iOS 13 Leave a reply
  9. New Garmin Service Integration 4 Replies