Distance not updated for a while after resuming activity

Former Member
Former Member
Hi, I already posted about that in the 1.2.0 SDK thread, but noticed that this happens also with the 1.1.4 SDK. Here is a link to an activity with that problem:

https://connect.garmin.com/modern/activity/928290642

At 2:06 I paused the activity by calling session.stop() from my app. Then at 2:16 resumed it by calling session.start(). All values from the ActivityInfo are updated as expected, except for the elapsedDistance one, which starts to update a lot later. When switching from "Over Time" to "Over Distance in the upper left corner of the graphs, then the map shows where the distance started to update again: a lot later than all other values.

I just wanted to ask where the best place would be to call session.stop(), session.start(), session.save() and session.discard()? Is it allowed to call them from a menu delegate? Or from the onUpdate() function? Or should they be called only from timer callbacks?

I also noticed that the fr920xt vibrates and beeps when calling one of those functions, but the vivoactive not. Also the fr920xt shows the lap screen automatically when calling session.addLap(), but the vivoactive not. The vivoactive on the otherhand shows "GPS ready" automatically, but the fr920xt not.

Is here a way to disable the automatic feedback? Or have it on all devices? Otherwise I guess I have to do something like if (device.is_fr920xt) ...

I'm testing with the vivoactive and fr920xt with the latest beta firmwares for the 1.2.0 SDK.

Thanks and greetings,
Mete
  • Hi FIN

    All of the automatic beeps, vibrates, and screens for activity functions like start, stop, and AddLap will be going away in future versions of watch firmware.

    See Brandon's post at the end of this thread.

    https://forums.garmin.com/showthread.php?320320-ActivityRecording-Session-Tones-and-Vibes

    I don't know what the standard is for GPS Ready notifications.
  • Former Member
    Former Member over 9 years ago
    Thanks! That's great news! I would also vote for no default vibrations/sounds/screens in apps. The default lap screen does not make sense at all on my app for example.

    Yesterday I rearranged the calls and got it working. I don't know why, but it might be some internal synchronization issue or so. Previously I did:

    - press KEY_ENTER first time -> session.start()
    - press KEY_ENTER -> session.stop()
    - press KEY_ENTER -> show menu with "Resume" -> session.start(), "Save" -> session->save() and "Discard" -> session.discard()

    With that I got that the elapsedDistance was not updated after resuming.

    Then I changed it to:

    - press KEY_ENTER first time -> session.start()
    - press KEY_ENTER -> show menu with "Pause" -> session.stop(), "Save" -> session->save() and "Discard" -> session.discard()
    - press KEY_ENTER -> session.start()

    That works great and another benefit is, that the menu doesn't cover my screens while paused so I can look at my numbers during the pause.
  • Interesting.....

    I am using that sequence and seems to be working.

    if( evt.getKey() == Ui.KEY_ENTER ) {
    if (SwStartStop == 0) {
    SwStartStop = SwStartStop + 1;
    StartSession();
    } else if (SwStartStop == 1) {
    PauseSession();
    } else
    ResumeSession();
    }
    }