Save FIT Field correctly

Hi all,
I've a time value and I need to view it on my connect IQ activity, but it seems wrong and I don't know why (my knowledge are limited, so I discard save value as time, and save as string instead).


In a side I've FIT Field setted correclty (I think):

mTotalWaveTimeField = mSession.createField("timeOnWave", 5, FitContributor.DATA_TYPE_STRING, { :count => 32, :mesgType => FitContributor.MESG_TYPE_SESSION});
...
timeOnWave = Lang.format("$1$:$2$", [mTotalWaveTime / 60, (mTotalWaveTime % 60).format("%02d")]);
mTotalWaveTimeField.setData( timeOnWave );

In the other side I take this value (same variable timeOnWave) to present on a screen



But when I save the activity looks like:


What's wrong?? Why my value (even as string) doesn't save correctly??

How string "01:49" it converts to "3"??? I couldn't understand... same value, setData correctly... Something I'm doing very wrong...

Any help would be appreciate. Thanks in advance!

  • Same with app settings.  It keeps the old versions of apps around for people that haven't updated to the newer version of the app.

  • But it's very good, there is no collision between versions.

  • But it's very good, there is no collision between versions.

    That's right. Reading back on the earlier posts in this thread it seems that maybe there was some misunderstanding and/or imprecise language:

    The way fitcontrib data is shown is associated with the version of your app in the store.  Exactly the same way the app settings are. 
    But it means that in store has to be all versions of app but store exposes only newest otherwise the older application would get settings from newest version.

    Even though Jim said "the version of the app in the store", I think we all agree that the way it actually works is the store (or Garmin's servers) must have *all versions* of your app (at least the XML sections) for the purpose of settings and FIT contribution data, even though the store only exposes the latest version of the app.

    So perhaps a different way to phrase it would be:

    "For a given version of your app that was uploaded to the store, FIT Contributor data is displayed in Garmin Connect using the FIT Contributor metadata (in XML) associated with that version. If your installed app version was not uploaded to the store (i.e. it was sideloaded), or the FIT Contributor metadata is absent from that version, then FIT Contributor data will not be displayed in Garmin Connect.

    (Just like settings.)

    EDIT: or more simply

    "If you want to see FIT contributor data, the installed version of your app must be uploaded to the store and it must have FIT contributor metadata (in XML.)"

    EDIT or to be 100% precise:

    "If you want to see FIT contributor data, the version of your app that was used to create the activity must be uploaded to the store and it must have FIT contributor metadata (in XML.)"

  • And that's how I've understand it Slight smile

  • With fit config, another reason that old definitions need to be "hung on to" is that if a user has been using an app for some time, is the definitions for the old version needs to be used if a user looks back at an activity that was recorded with that  version.