FitContributor in DataFieds

It seems I am stuck in writing data into a fit file to be analyzed in Garmen Connect after the activity is finished. What I am doing is:

- creating a DataField
- in my initialize() method, i create the FIT fields like

FitActivityField = DataField.createField(
                "Field",
                FIELD_ACT_ID,
                FitContributor.DATA_TYPE_UINT32,
                {:mesgType=>FitContributor.MESG_TYPE_SESSION, :units=>"m"});
FitActivityField.setData(0);

- in my compute() method I then write the data like

FitActivityField.setData(10);

What am I missing? I found the documentation in the Programmers Guide about the Namaste example, but it talks about sessions, that are not necessary for DataFields, as far as I understand? Some examples are about editing XML data, but is there an explanation about how this should be done? Is there a detailed documentation/example about how to add FIT data in a DataField?

  • https://developer.garmin.com/connect-iq/core-topics/activity-recording/

    It seems you've missed one step. You need to describe the fitContributor data in one of the project resource files.

    You can load the generated fit file into the MonkeyGraph tool (ConnectIQ > Start MonkeyGraph in Eclipse) to make sure that everything is as expected. Once you've published your app you should be able to see the data on Garmin Connect.

  • Hi Travis, thanks for your reply! I now added the fitContributor descriptions to my resources and made sure the IDs are matching. Then I generated the IQ and FIT files as described, but when I load both into MonkeyGraph, the screen remains blank (in fact a monkey is sitting on a notebook). Are there other ways to check if the FIT recording was successful and to preview the data?

    Is my understanding correct that I won't see any FIT data in my Garmin Connect App when I sideloaded my app? I will only see it when I use the App from the store after I uploaded it?

    And I had the phenomenon that after testing my (sideloaded) datafield in a run that no FIT data at all, even from other (non sideloaded) datafieds, were shown anymore. Is that a normal behaviour when using sideloaded datafields?