Custom Field not showing on Activity Report on Garmin Connect

Hi!

I am developing a custom app where i have to measure the number of "jumps".

When i try to create a custom field in my _session it is net being taken into account in the final activity report on Garmin Connect after saving (or I just don't see it).

This is how i initialize it:

    function resumeActivity() {
       
        if(_session == null) {
        _session = ActivityRecording.createSession({
            :name => "MyActivity"
        });

        _customJumpsCounterField = _session.createField(
            "Jumps",
            JUMPS_COUNTER_FIELD_ID,
            FitContributor.DATA_TYPE_UINT32,
            {
                :mesgType=>FitContributor.MESG_TYPE_SESSION,
                :units=>"jumps"
            }
        );

        }
           
        _session.start();
        // app logic
    }
And here is how i update it (every jump):


    function handleJumpDetected() as Void{
        if(_customJumpsCounterField != null) {
            _customJumpsCounterField.setData(_jumpCount);
        }
 // app logic
    }
What do I miss?:C
Thank you for the help!
  • Where are you doing the start and the save for the session?

    Also, remember you must install the app from the store for it to show in garmin connect.  (beta app is OK).  You won't see any data with a sideload.

  • I mean even side-loading provides me the activity into Garmin Connect and even Strava, but as you say - maybe some custom functionalities won't work. Will try the beta loading.

    Nevertheless, i tried to view it through FIT Tool viewer (online version) and still can't even see the field.

    The start of the session is actually in the above code at 


    _session.start();

    whereas I save the session here:

        function saveActivity() {
            if(_session != null) {
                _session.save();
            }
           // ... app logic
           
        }

    I even made the xml file for it, but I think it's kinda redundant as I am not creating a WatchUI.DataField
    but here it is:

    <fitContributions>

        <!-- SESSION field (final total) -->
        <fitField
            id="0"
            displayInChart="false"
            displayInActivitySummary="true"
            sortOrder="1"
            precision="0"
            dataLabel="@Strings.jumps_label"
            unitLabel="@Strings.jumps_unit" />
    </fitContributions>
  • Try adding  _session.stop() before _session.save()

  • Hmm I am already stopping it a little earlier, when the user hits the "Start/Stop" Button, here: 

        function stopActivity() {
           
               
                stopTimers();
                stopJumpTracking();

           
            _session.stop();
            _inProgress = false;
        }
  • Adding the app to the Garmin IQ Store fixed it :) Thanks for the help!