Ability to encode an activity using JavaScript SDK

C# FIT SDK etc have the ability to encode as well as decode FIT files. 

The JavaScript SDK is only able to decode FIT files. It would be useful to be able to encode again using the JavaScript SDK. 

When will this be functionality be implemented?

  • We just published v21.161.0 of the JavaScript SDK to npm. For 21.161 we only updated the JavaScript SDK, we did not update any of the other SDKs. 

    This version adds an Encoder feature to the SDK. Consider this a soft launch, as this is the only place we are announcing it for now. This gist has example code for using the Encoder.  
    https://gist.github.com/pryhoda/1c060fbafc94849beb7ee489e97f308e 

    We added two callbacks to the Decoder that in combination with the Encoder will allow you to rewrite a FIT file without loosing any valid data. This includes preserving unknown messages and fields. There are examples of how to do this in the gist.

    We can use this thread for comments and feedback.

  • Fantastic, ! I'll work on porting my existing code over to it tomorrow.

    One quick question as I'm working on it -- is there a known issue with transferring more than one .FIT file at a time? I find if I send two workouts only one of them will appear in my list and the other is lost.