Hi,
I created an app and after create a session I created a custom field for FIT file using
step_count_field = session.createField("Steps", 0, FitContributor.DATA_TYPE_UINT32, { :mesgType=>FitContributor.MESG_TYPE_RECORD });
Then while the application runs data are recorded to the FIT file using
if(step_count_field != null){ step_count_field.setData(traveled_distance.toNumber()); }
where traveled_distance is an application variable
I created a file in this path resources/fitcontributions/fitcontributions.xml and inside this file I created the xml field as reported here
<fitContributions>
<fitField id="0" displayInActivitySummary="true" dataLabel="@Strings.steps_lab" unitLabel="@Strings.steps_unit" sortOrder = "0" precision="0" />
</fitContributions>
and in my resources/strings/strings.xml I created the field referring to the previous file
<strings>
<string id="steps_lab">Steps</string>
<string id="steps_unit">steps</string>
</strings>
The app compiles but when I uploaded the .prg to my Vivoactive 4 to test the app the app summary never shows my custom field, so what I made wrong ?
The only difference I can notice is that I invoked Strings with capital "S" in the fitcontributions.xml while strings.xml in not with capital s in the strings.xml file
Thank you