Type of sport in activity recording session

Hello,

I'm the creator of the Badminon Score Tracker app. I am now trying to associate badminton matches to Garmin Connect activities.

I've created an activity recording session using:
session = Recording.createSession({:sport => Recording.SPORT_GENERIC, :subSport => Recording.SUB_SPORT_MATCH, :name => "Badminton"});

Full code is available on Github if needed.

At the end of a match, I show some statistics about the match such as max heart rate or elapsed distance. This works well within the simulator but not with my real Fenix 3. It never displays anything. It seems the activity info object is empty.

Then I discovered that if I change the type of sport:
session = Recording.createSession({:sport => Recording.SPORT_RUNNING, :subSport => Recording.SUB_SPORT_MATCH, :name => "Badminton"});


Everything is working fine. My stats view displays good data and the resulting activity is nicely displayed on Garmin Connect website.

First of all, it would be nice if the simulator and the watches behave the same. That's not the first time I encounter this problem.

Secondly, is this the normal behavior? Why does changing the type of sport changes the type of data that are recorded? What I am supposed to use if I want to display info such as heart rate or elapsed distance in my badminton activities? Is there a place where I can find what kind of data are recorded for each type of sport?

Thanks.
  • Former Member
    Former Member over 8 years ago
    We do have a ticket tracking this issue.
  • In Connect IQ and FIT API there is defined sub_sport road and sub_sport mtb.
    I have contact to a connect iq developer. He added in his app cycling app pro the ability to explicit choose the sub sport type for road and mtb. But the vivoactive generates a fit file with sub_sport set to 0 instead of 7 for road bike for example.
    So on sync with garmin connect the activity is synced as generic cycling.


    I can confirm that we have a couple of tickets open to investigate this. We need to be sure the sub sport information is getting written to the Fit file correctly, and then see what Garmin Connect is doing with that information.

    Generally, the sport an sub sport types should have no impact on the recording from Connect IQ. It is just a way of denoting the type of activity, but Connect IQ does nothing else in response to the activity type. Devices may change the way an activity is treated based on the sport and sub sport, and Connect may treat data differently based on the sport and sub sport. I believe the intent was to avoid Connect IQ meddling with native behaviors. I don't know what the best solution is, but clearly there is some confusion over what developers should expect from activity recording. It might be a good idea for us to coordinate with the device teams, Garmin Connect, etc., so we can provide a more consistent experience within Connect IQ apps.
  • Could someone from the Garmin team give an update about this issue? Thanks!
  • I'm still waiting for a follow up. That's not encouraging...
  • Hello,

    I'm so sorry that we haven't gotten back to you on this one. We have been working on trying not to let that happen, but it did this time and I apologize again. I have reached out to the team in charge of it and they have re-prioritized it to be looked at within the next week or two.

    Thank you again,
    Coleman
  • So is this a device specific issue? I agree with matgora's contention that all available data should be recorded to the fit file. It is not for Garmin to decide what data is relevant to an activity type. And it sounds like this is the expected behavior of CIQ. It's not like data is expensive these days.

    also note that you aren't limited to the "sports" specified in the CIQ header files. You can always just find the sport in the FIT sdk and specify the actual index. Like Golfing isn't listed in the CIQ docs but you can just specify the value of 25 in the session creation call.
  • One month and a half later, still no news...

    I think the same problem has been reported here https://forums.garmin.com/showthread.php?362690-Fit-Contributor-datafield-not-working-on-Fenix3 too.
  • The sub_sport is correctly written to the file, if the connect iq app uses the correct form of recording session. I have been told that some developer uses :subsport instead of :subSport .
    I contacted the developer of my favourite app for cycling and he changed it in his conect iq app. Now I made some activities with "Mountain Bike" or "Road bike" as subsport and thry get correctly synced to garmin connect as their correct sub sport activity. So I assume, that the fit file is correct for the sub sport. Brandon here told me that if the developer uses the wrong (i.e. :subsport) the sub_sport gets totally ignored in the fit file.
    So for me this problem is resolved. Remaining is only the problem, that on my device the vivoactive hr you could create garmin default activities like Road Bike which until now are only a copy of the generic cycle and have no sub_sport set to record in the fit file. So those activities gets actually synced as generic cycle. This is reported to the device developer team but no information if or when it gets resolved.
  • While on the subject of the contents of the FIT file, is there a specification of what data is recorded for each sport, and at what frequency?

    I guess there's an algorithm implemented which decides when to save a point depending on the chosen sport and the nature of the track.

    I'm trying to capture a track (time/lat/lon), at 1-second intervals. I'm currently using SPORT_GENERIC and getting the data I need, but at random intervals, averaging around 20 seconds.

    Is there a way for me to force the recording every second?