Johnep

Hi I am looking to create a simple distance target widget and I am hoping someone out there could tell me if I can gain access to the weekly and monthly Running Km Totals in the SDK. The data is available on my Forerunner 235 in activity History data but I cannot see it mentioned in any API docs, I am hoping it is available to be used in this way.

Cheers
  • No, it isn't available directly in ConnectIQ. You could implement a data field to accumulate your recorded miles as you ran them, but you would have to configure the field to use one of the data field slots.. Probably not a good use of a data field slot.

    If Garmin made the Garmin Connect API available to ConnectIQ, you'd be able to get the data with a web service call. Unfortunately, to do that you'd have to pay a licensing fee ($5000) and justify to Garmin that your project is worthwhile to them.

    Another option would be to access activity data on a 3rdparty service. If you use Strava, and you have Garmin Connect automatically upload all activities to Strava, you can make a web service call to the Strava API for the data you need. It would probably make a lot of sense to write a web service that would get a request from your ConnectIQ app, go out to Strava for the data, summarize it, and send back the totals. I suggest this because the data link between the mobile device (iOS/Android) and a Garmin is very slow, and the data sent back is rather large.

    Travis
  • Former Member
    Former Member
    Access to GC data

    I was thinking of something similar - a widget to advise on training run distances which would take account of recent activity so I'd like to have access to recent run dates and distances. I'm disappointed to see I can't access this on GC without paying the fee especially as this simple data sits in the phone app. Have you looked in to the strava API?
  • I'm disappointed to see I can't access this on GC without paying the fee especially as this simple data sits in the phone app.
    It doesn't, though; the Garmin Connect Mobile apps have to request it from the cloud-based Garmin Connect service on-demand when the user wants to see the information (which is logically distinct from retrieving the data in a format that the user can use in some other fashion than simple ‘eyeballing’).
  • Hi I didn't progress with the strava API as to be honest I created a simple widget to sum the daily distance for all activities which satisfied what I was looking to do.

    https://apps.garmin.com/en-US/apps/4aa8d666-1e9d-4648-89c3-58b3aeabfc0b

    It would be nice to see the total distance by activity type at some point but I am not that proficient at programming the SDK yet.

    many Thanks
  • It's a shame Connect IQ API does not allow you to count only running weekly kilometres. It would be really nice to have such a widge