Announcement

Collapse
No announcement yet.

createField with DATA_TYPE_STRING on MESG_TYPE_SESSION

Collapse
X
  • Time
  • Show
Clear All
new posts

  • createField with DATA_TYPE_STRING on MESG_TYPE_SESSION

    Hi,

    I know in the early days there was some issues, but I thought these had been resolved. I've noticed that I can't see any output in Garmin Connect Web UI or iOS App. Am I missing something?

    Cheers
    Chris
    Last edited by Coleman.ConnectIQ; 10-10-2018, 08:10 AM.
    hSoftware Applications

  • #2
    Hi,

    Anybody got ideas on this. This feature is excellent for me, if it works, to record a post workout summary. However nothing appears, albeit successful.

    Thanks
    Chris
    hSoftware Applications

    Comment


    • #3
      Sounds like it could be related to this bug report.
      https://forums.garmin.com/forum/deve...tivity-summary

      As of May, doesn't look like it was fixed.

      Comment


      • #4
        I think you're actually seeing two different bugs here with the same result. Do you know if they are displaying correctly on Android? We have a couple of ticket being worked right now by our web and GCM teams to address this if that is the case. Otherwise you can take a look at your fit file using the FITtoCSV tool in the FIT SDK to ensure that your values are indeed being recorded to the .fit file itself.

        Thanks,
        -Coleman

        Comment


        • #5
          Thanks. I’ve noticed that they are missing from both the fit file on the device and one created by the simulator. Debugging statements are showing success.

          Is is there something I am missing?

          Thanks
          Chris
          hSoftware Applications

          Comment


          • #6
            Maybe this is a dumb question, but are you creating the field in Datafield.initialize(), assuming your app is a data field and not a device app? I've found that creating it any later will fail silently (for example, you can't create it in onTimerStop(), even if that's where you are writing it.). Might also want to make sure your call to createField specifies the :count option with enough room for your string. The default is 1, so you would probably want to override that.

            This is not 100% relevant to your situation because the data is missing from the FIT files, but you also need the displayInActivitySummary="true" attribute in your <fitfield> definition, otherwise it may not show up in GC or GCM.
            Last edited by FlowState; 10-11-2018, 03:28 PM.

            Comment


            • #7
              Thanks. It is actually a App - hReferee.

              So it did work, but then stopped working, so I am now trying to fix it.

              The field is created from the Recording as
              _recordingFieldScore = _recordingSession.createField("Score", 0, FitContributor.DATA_TYPE_STRING, { :mesgType => FitContributor.MESG_TYPE_SESSION, :count => 6 });

              Defined as
              <fitField id="0" displayInChart="false" displayInActivitySummary="true" sortOrder="0" dataLabel="@Strings.dataLabelScore" unitLabel="@Strings.unitLabelScore" />

              Then updated as, where score is a string such as "0-0"
              _recordingFieldScore.setData(score);
              hSoftware Applications

              Comment


              • #8
                Ok, with my new found knowledge of FitToCSV and the simulator, I think I have worked it out.

                I have 2 fields of type DATA_TYPE_STRING on MESG_TYPE_SESSION. If both are used, neither are saved. If one is commented out, the other works.

                When both are enabled, you can see both them in the definition, but just empty.
                hSoftware Applications

                Comment


                • #9
                  Updated App in Store, and still not correct in Activity when viewing on the Garmin Connect Website (so I guess bug already raised).

                  Removing the second STRING field has at least now caused the App to be 'associated' to the recording, and the custom field to be shown.

                  Website reports <Score 0.>
                  FIT (when decoded with FitToCSV) reports <Score,"1-1 (1st:0' 1-0,2nd:8' 1-1)>
                  iOS App correctly reports this

                  So, in summary:
                  1. We still have the reported bug in the Website Garmin Connect
                  2. There’s an issue when you use 2 String Data Fields

                  Last edited by chrishares; 10-13-2018, 01:26 PM.
                  hSoftware Applications

                  Comment


                  • #10
                    chrishares, great work here. I'll get the bug with 2 String Data Fields issue reported. A question about the messages you are recording there. Is there any chance that they are conflicting when trying to save them to the fit file?

                    Tag: WERETECH-6312
                    Last edited by Coleman.ConnectIQ; 10-15-2018, 12:32 PM.

                    Comment


                    • #11
                      Thanks, What I've also now spotted is that same App and Version:
                      - Simulator FIT all correct
                      - Fenix 5X FIT all correct
                      - Vivoactive FIT nothing at all

                      This may also be confusing the two string field testing, but I am now all confused. I checked all the FIT files using FitToCSV, and the Vivoactive returns no errors.

                      Confused!
                      hSoftware Applications

                      Comment


                      • #12
                        chrishares,

                        I'm trying to get this reproduced right now and I'm struggling. I tried implementing your code in a DF contributing with 1, 2, and 3 fields contributed. So far the sim and a vivoactive have both recorded the info. Would you be willing to send a zipped version of your project code to [email protected] for us to look at in more depth. Perhaps there is something in the logic somewhere else that is preventing it. Have you tried pairing things back to simply the fitContributor code?

                        Thanks,
                        Coleman

                        Comment


                        • #13
                          Ok, I've done a new release and some more testing.

                          Basically, If I create a session which now has 2 numeric session fields, 2 numeric recording charts, and 1 string. I get all 5 on my Fenix 5X recorded, but only the 2 charts on my Vivoactive!
                          hSoftware Applications

                          Comment

                          Working...
                          X