There are not many posts on the functionality and/or any documentation concerning the FitContributor and :nativeNum.
My goal, I would like to write to the main 'distance' in the fit file, but I cannot. I'm successfully writing to a custom distance field as a workaround.
Is this nativeNum functionality broken in SDK 2.2.4 or am I misinterpreting the nativeNum functionality?
I've tried this as a Fit.MESG_TYPE_RECORD (snip below) and as Fit.MESG_TYPE_SESSION (total_distance :nativeNum=>9)
relevant code snips
// initialization of dist, the id is unique
dist = DataField.createField("distance", 1,Fit.DATA_TYPE_FLOAT,{:nativeNum=>5, :mesgType=>Fit.MESG_TYPE_RECORD, :units=>"m" });
...
//later in code
dist.setData(distance_m); // in meters as a float
FitContributor XML
<fitField id="1"
displayInChart="false"
displayInActivitySummary="false"
sortOrder = "0"
precision="2"
dataLabel="@Strings.distance_label"
unitLabel="@Strings.distance_unitsm" />