ToyBox ActivityRecording not working properly

Former Member
Former Member
As in https://developer.garmin.com/downloa...Recording.html said, you can use sup_sports in ConnectIQ SDK.
But creating a recording session on the vivoactive hr with software 2.90 with
Record.createSession({:name=>"Road Bike", :sport=>Record.SPORT_CYCLING, :subSport=>Record.SUB_SPORT_ROAD });
results in a fit-file with sport set to 2 (correct) but sub_sport set to 0 instead of 7.
So the road bike activity is synced as generic cycling.
Same happens when you use the garmin activity road you can create on the vivoactive hr. Fit file contains sub_sport 0 instead of 7.
What do do to go around with this bug as garmin support says I have to post it in the connect iq developer forum which is the right channel for those bugs
  • Former Member
    Former Member
    I've created a ticket to investigate this issue.
  • Former Member
    Former Member
    I've created a ticket to investigate this issue.

    Thanks, hope it gets resolved.
  • Former Member
    Former Member
    I've created a ticket to investigate this issue.


    Any status updates on this issue ?
  • Former Member
    Former Member
    Still no news on that issue? ;-(
  • Former Member
    Former Member
    We have been unable to reproduce this issue. It is properly recording the sub sport to the fit file using the code in the initial post on the Simulator and on the vivoactive HR in my tests.

    When investigating, we did find that some people accidentally used the symbol :subsport instead of the symbol :subSport. Using the wrong symbol will prevent the sub sport from getting set, but you will not get any warnings or errors, because the sub sport is an optional parameter.
  • Former Member
    Former Member
    We have been unable to reproduce this issue. It is properly recording the sub sport to the fit file using the code in the initial post on the Simulator and on the vivoactive HR in my tests.

    When investigating, we did find that some people accidentally used the symbol :subsport instead of the symbol :subSport. Using the wrong symbol will prevent the sub sport from getting set, but you will not get any warnings or errors, because the sub sport is an optional parameter.


    I have additionally created an activity road bike which is possible with the Vivoactive HR by default. Those activities also get synced as generic cycle instead of road bike.
    And I use the Connect App Cycling Professional where you can set road bike or mountain bike as activity type. The developer uses the setting of sub sport as it is described in the documentation. And activities with this App get also synced as generic cycle. So i think it is definitely an error and you could easily reproduce it.
  • Former Member
    Former Member
    You reported in your initial post that the sub-sport is set to 0 in recorded files. I have recorded files with the simulator in the ConnectIQ simulator and with the vivoactive HR. Decoding these files shows that the sub-sport is correctly set to 7 as expected. I am seeing sub-sport recorded when the API is used properly, so I think it is possible the app you mention is making an error somewhere.

    I was also able to import these files into Garmin Connect and they appeared as Road Cycling without modification.
    https://connect.garmin.com/modern/activity/1499392409

    If you can provide a some sample source code that reproduces this issue, then we can investigate further. I used the source snippet in the first post of this thread to generate the activity linked above.
  • Former Member
    Former Member
    You reported in your initial post that the sub-sport is set to 0 in recorded files. I have recorded files with the simulator in the ConnectIQ simulator and with the vivoactive HR. Decoding these files shows that the sub-sport is correctly set to 7 as expected. I am seeing sub-sport recorded when the API is used properly, so I think it is possible the app you mention is making an error somewhere.

    I was also able to import these files into Garmin Connect and they appeared as Road Cycling without modification.
    https://connect.garmin.com/modern/activity/1499392409

    If you can provide a some sample source code that reproduces this issue, then we can investigate further. I used the source snippet in the first post of this thread to generate the activity linked above.


    Okay, i wrote to the developer of cycling app professional to check if He uses the right type for subsport.
    But for my initial post i also made an activity with the activity type "road" i created with the "Add New" method of the vahr. I later converted the resulting fit file with the fit2csv Tool of the fit sdk and there is a sub-sport value of zero. So is this a bug in the conversion tool or in the way, the activity type is created with the vahr?
  • Former Member
    Former Member
    Okay, developer admits He uses subsport instead of subSport. He will made an update for this.
    Remains the default New added activity type road with the Standard method of the Garmin vahr. How can we investigate, why subsport of an activity created with that type is set to zero in the fit file (if fit file converted with fit sdk which was the way i check this)?
  • Former Member
    Former Member
    Okay, made a short ride with the copied by Add New activity road bike. Just some seconds. On sync it is shown as generic cycling on the Connect Mobile app and so it is synced to Garmin Connect. So either in the fit file or in the sync process the sub sport gets cleared. Can you check this with your vahr?