fitContributor stock fields

Good morning!

I´ve finally found my issue, which made my custom fields not visible in GC.
There were two separate files, one for fitContributions and one for properties. That works on the emulator and also the APPNAME-fit_contributions.json seems fine.
But GC will only process the first file (with the properties), the contributions has been ignored all the time :(

Whatever, it now works :cool:

3 custom Fields where shown fine, but in english. (App is set to german, translations are all there)
7 fields refer to existing fields, but where also shown in the custom Connect IQ section

Finally my questions:
- What can I do, to make the custom fields appear in the right language? dataLabel & unitLabel were set dynamically. I also call the field by its translation (...createField(Ui.loadResource(Rez.Strings.menu_label_Rep)...)
- How can I use stock fields, like "NoOfTransition" nativeNum=>113 ?
  • Stock field is not affected, it appears under "Connect IQ" section. Number of Transition is zero.
  • How to name it properly? Garmin has all translations for none-custom fields. Do I really have to translate them on my own?
  • Units in profile.xml says f.e. seconds, factor 1000 for "TimeInCadence" nativeNum=>67 and it is shown in GC in 1:23.45 but my submitted value is displayed in 83450s


customField = new CustomField();
//Repetitions Field ID 0
repetitionField = customField.createField(Ui.loadResource(Rez.Strings.menu_label_Rep), 0, Fit.DATA_TYPE_UINT16,
{
:mesgType => Fit.MESG_TYPE_SESSION,
:nativeNum=>113, //stand_count Uint16
:units => Ui.loadResource(Rez.Strings.unit_Rep)
});
repetitionField.setData(0);

//Stretch Duration Field ID 1
durationField = customField.createField(Ui.loadResource(Rez.Strings.menu_label_Timer), 1, Fit.DATA_TYPE_UINT32,

{
:mesgType => Fit.MESG_TYPE_SESSION,
//:nativeNum=>112, //time_standing Uint32 s
:units => Ui.loadResource(Rez.Strings.unit_Duration)
});
durationField.setData(StretchTimer.GlobalSetup.StretchDuration.value());

//Rest Interval Field ID 2
restingField = customField.createField(Ui.loadResource(Rez.Strings.menu_label_Rest), 2, Fit.DATA_TYPE_UINT16,
{
:mesgType => Fit.MESG_TYPE_SESSION,
:units => Ui.loadResource(Rez.Strings.unit_Duration)
});
restingField.setData(StretchTimer.GlobalSetup.RestDuration.value());

// StockFields

totalCycles = customField.createField("TotalCycles", 3, Fit.DATA_TYPE_UINT32,
{
:mesgType => Fit.MESG_TYPE_SESSION,
:nativeNum=>10,
:units => "cycles"
});

num_laps = customField.createField("Laps", 4, Fit.DATA_TYPE_UINT16,
{
:mesgType => Fit.MESG_TYPE_SESSION,
:nativeNum=>26
});

totalMovingTime = customField.createField("TotalMovingTime", 5, Fit.DATA_TYPE_UINT32,
{
:mesgType => Fit.MESG_TYPE_SESSION,
:nativeNum=>59,
:units => "s"
});

timeInPowerZone = customField.createField("TimeInPowerZone", 6, Fit.DATA_TYPE_UINT32,
{
:mesgType => Fit.MESG_TYPE_SESSION,
:nativeNum=>68,
:units => "s"
});

timeInCadenceZone = customField.createField("TimeInCadence", 7, Fit.DATA_TYPE_UINT32,
{
:mesgType => Fit.MESG_TYPE_SESSION,
:nativeNum=>67,
:units => "s"
});

timeStanding = customField.createField("TimeStanding", 8, Fit.DATA_TYPE_UINT32,
{
:mesgType => Fit.MESG_TYPE_SESSION,
:nativeNum=>112,
:units => "s"
});

standCount = customField.createField("NoOfTransition", 9, Fit.DATA_TYPE_UINT16,
{
:mesgType => Fit.MESG_TYPE_SESSION,
:nativeNum=>113
});
[HTML]

<fitContributions>
<fitField id="0"
displayInActivitySummary="true"
dataLabel="@Strings.menu_label_Rep"
unitLabel="@Strings.unit_Rep"
sortOrder = "0"
precision="0"/>

<fitField id="1"
displayInActivitySummary="true"
dataLabel="@Strings.menu_label_Timer"
unitLabel="@Strings.unit_Duration"
sortOrder = "1"
precision="0"/>

<fitField id="2"
displayInActivitySummary="true"
dataLabel="@Strings.menu_label_Rest"
unitLabel="@Strings.unit_Duration"
sortOrder = "2"
precision="0"/>

<!-- S/TestFields -->

<fitField id="3"
displayInActivitySummary="true"
dataLabel="@Strings.TotalCycles"
unitLabel="@Strings.unit_Rep"
sortOrder = "3"
precision="0"/>

<fitField id="4"
displayInActivitySummary="true"
dataLabel="@Strings.Laps"
unitLabel="@Strings.Laps"
sortOrder = "4"
precision="0"/>

<fitField id="5"
displayInActivitySummary="true"
dataLabel="@Strings.TotalMovingTime"
unitLabel="@Strings.unit_Duration"
sortOrder = "5"
precision="0"/>

<fitField id="6"
displayInActivitySummary="true"
dataLabel="@Strings.TimeInPowerZone"
unitLabel="@Strings.unit_Duration"
sortOrder = "6"
precision="0"/>

<fitField id="7"
displayInActivitySummary="true"
dataLabel="@Strings.TimeInCadence"
unitLabel="@Strings.unit_Duration"
sortOrder = "7"
precision="0"/>

<fitField id="8"
displayInActivitySummary="true"
dataLabel="@Strings.TimeStanding"
unitLabel="@Strings.unit_Duration"
sortOrder = "8"
precision="0"/>

<fitField id="9"
displayInActivitySummary="true"
dataLabel="@Strings.NoOfTransition"
unitLabel="@Strings.unit_Rep"
sortOrder = "9"
precision="0"/>

<!-- E/TestFields -->
</fitContributions>[/HTML]

" />">

Is that possible? Am I doing something wrong?
  • Some Funfacts:

    Connect Mobile shows german field descriptions
    Connect Website shows english field descriptions

    Only every second recording/upload works.
    • Working
    • Not working
    • Working

    Downloading the original files and converting into csv shows: The data is actually missing in the second recording.
    (It is not exactly every second... fourth worked, fifth doesn´t)

    Stock field Total Sets is " 1 ". Some minutes later, it changes to " -- ".

    SUB_SPORT_FLEXIBILITY_TRAINING is "Muscular" in Connect, with weights and stuff. Independent of what type I choose (tried a lot), nothing fits closest to stretching/flexibility.

    Web:
    " />">
    Mobile:
    " />">
  • Feel I´m talking to myself :rolleyes:

    Happy that I found out how to solve the issue and transferred the changes from my "Please do not Approve my Test App"-App to the real App.
    And *drumroll* it still does not work!

    Off course I´ve checked if the latest Version is on my watch. Then I´ve waited for about 4 hours and did 3 different recordings. The first didn´t contain any data (See Funfact 2), the second and third did. But it wasn´t shown on Connect Mobile, as well it was not on Web.

    Will the fitContributor-Metadata not be updated? Does this work only on initial upload?
    Could some Garmin developer please take a look?
  • Former Member
    Former Member over 8 years ago
    This may has to do with the known issues.
  • This may has to do with the known issues.


    Oh, I´m sorry that I´ve overseen that :eek:
    Thank you!

    [Offtopic]
    But it actually doesn´t really help to decrease my frustration level on developing for Garmin. Or using their Portals (Connect 3.19). Or Products (VA, fenix3, virb, nüvi). Or their software (Virb Edit)...
    Nothing works as expected. Rather then fixing it, a new product/version/SDK is released every year, which makes the old obsolete and left in a none working state.
    In germany we call it "banana software". It is delivered in green and ages at the customer side. Or never. "Sorry, too old and out of service..."
    I love the devices and all the nerdy stuff, which is capable with it! But I´m running from one issue into another. Again and again. From device to device.

    The number of updates each device gets, speaks their own language. Apropos language: Naming conventions, camelCase, PascalCase or enumerations let me get a view on how strict Garmin follows & supervise development guidelines. If there are any! Some say that there are monkeys working on Connect IQ :p

    Enough rage for today! :rolleyes:

    [/Offtopic]