FitContributor: CreateField: populated from external JSON, what is offline behavior?

Former Member
Former Member

I am wanting to add a custom SESSION FIT field to an activity, populated by a makeWebRequest, that is primarily used for historical tracking, so I'd like the field to populate after the activity is complete as there is often no cell connection during this activity.

What is the behavior of a custom FIT field (created via FitContributor: CreateField) for inclusion as type SESSION for an activity that relies on an internet connection to make a JSON request, if no internet connection exists? Is there a way for the field to be populated after the activity has ended when the watch is connected to the phone again? Scenario:

1. User starts activity with custom Data Field, which contains the custom FIT field

2. User does not have internet access (or their phone) so makeWebRequest, which populates custom FIT field, does not return a value and the custom FIT field remains blank during activity

3. User later sync's the device with Connect IQ and can see the value of the custom FIT field populated by the makeWebRequest after the activity was completed

DESIRED OUTCOME: When device again has an internet connection (step 3), the JSON request completes and populates the custom FIT field for the activity, even though the activity is already complete. 

Thank you!

Joe

  • After you've saved the session, the .fit is done and closed, and may sync as soon as you are in cell/wifi range.  So you can't fill in any data after that.  You could wait for the data before you save the session, but if this is a data field, you can only do comm every 5 minutes at most, so that could be a long wait.