Can you explain what you mean by "SetData doesn't write data - it gets written at the appropriate time"?
I've noticed that in my datafield, where I write to my activity's FIT file, that the last value I send using setData... doesn't actually end up in the FIT file. So, what is "the appropriate time"? How can I force the data I've set with setData to be written out to the FIT file, so that final value gets written before I stop and save the activity.
Thanks!
I don’t know much about the sunmRy values. But I do record and lap and for both of these, you have to write the data or rather feed the data continuously. Every sec that is. So yeah.
Try that.
I mean that the watch decides when to write data to the FIT file -- setData only populates an internal field which is read by the process that writes to the FIT file. setData() doesn't write anything, it determines what will be written next.
For example, if you call setData multiple times while the watch is paused, that won't cause any data to be written. It's possible that the final value you write will be written at the point that the user unpauses the watch.
You can't force any data you've set with setData to be written. In your case, the last call of setData() before the watch is stopped should be the last thing that's written.
In any case, the watch is writing so many data points (e.g. one per second), that you probably won't be able to tell if one or two value was dropped at the end of the activity.