Environment
SDK: 2.3.2
FR935 FW 4.10
Garmin Connect Mobile 3.20 (iOS)
App type: Simple data field
Repro
1) Build simple data field with code and resource fragments given below
2) Export app and upload to store
3) Add the app as a field on an activity
4) Start activity, let it run for a few seconds, stop activity and save
5) Sync activity
6a) Examine activity on GC
6b) Examine actiivity on GCM
Expected Behaviour
String "hello" is displayed in GC and GCM
Actual Behaviour
"0" is displayed in GC.
"hello" is displayed in GCM (iOS).
Additional Notes
I have noticed the GC and GCM treat the <fitcontributions> metadata differently.
For example:
- For GC, displayInActivitySummary="true" needs to be present in order for a SESSION field to be displayed in the summary
- GCM displays a session field in the summary even if displayInActivitySummary="true" is not present in the metadata
- GCM (iOS) seems to ignore fillColor for graphed data, while GC respects fillColor.
As usual, replace <[ and ]> with parens.
SimpleDataFieldView.mc
var fitSummaryField;
var fitSummaryMaxStrlen = 18;
var fitSummaryValue;
function initialize<[]>
{
// ...
fitSummaryField = createField<["appStringData", 0, FitContributor.DATA_TYPE_STRING, { :count => fitSummaryMaxStrlen, :mesgType => FitContributor.MESG_TYPE_SESSION }]>;
fitSummaryValue = "hello";
// ..
}
function onTimerStop<[]>
{
fitSummaryField.setData<[fitSummaryValue.substring<[0,fitSummaryMaxStrlen-1]>]>;
}fit.xml
<fitContributions>
<fitField id="0" displayInActivitySummary="true" sortOrder="0"
dataLabel="@Strings.FitSummaryLabel"
unitLabel="@Strings.FitSummaryUnits"
/>
</fitContributions>
string.xml
<strings>
<string id="FitSummaryLabel">Random Label</string>
<string id="FitSummaryUnits"> </string>
<!-- FitSummaryUnits is not an empty string; it's one space on purpose -->
</strings>