Lap data in Activity::Info

I don't see lap data in Activity::Info. Is it possible to add it in future release?
Apart from all the data that can be displayed using built-in data fields it would be nice to have startLocation and startTime too.
Thanks.
  • Former Member
    Former Member over 8 years ago
    Current lap, current lap time and current distance can all be done programmatically .. I just did it recently for my app and I am not a proficient Connect IQ developer yet. So it is not that hard to do.


    I just did this for my Snapshot data field as well, but the problem is that the programmed lap information can quickly fall out of sync with any internal lap info the watch has set. E.g. auto laps, intervals, etc. These will still trigger but you have no way to know them in your own programmed field (in a generic way at least).

    It would be much better if they just made lap info available in the same way that current pace, HR etc is available in CIQ. We know the watch already has this information.
  • Former Member
    Former Member over 8 years ago
    I will send you a PM.


    thanks. What I need to be able to do is determine when the lap button is hit for use in a simpleDataField so that I can reset a counter. I figured that if I could capture the lap button when its pressed using the onKey function, that would do the trick but being a newbie, no luck yet with capturing the button event. Any thoughts?
  • Former Member
    Former Member over 8 years ago
    thanks. What I need to be able to do is determine when the lap button is hit for use in a simpleDataField so that I can reset a counter. I figured that if I could capture the lap button when its pressed using the onKey function, that would do the trick but being a newbie, no luck yet with capturing the button event. Any thoughts?


    If there's an answer to this then maybe post to the thread if possible. I'd love to know how to capture lap button presses as well.
  • thanks. What I need to be able to do is determine when the lap button is hit for use in a simpleDataField so that I can reset a counter. I figured that if I could capture the lap button when its pressed using the onKey function, that would do the trick but being a newbie, no luck yet with capturing the button event. Any thoughts?


    from within a data filed, you can not catch button events. It's not possible today.
  • If there's an answer to this then maybe post to the thread if possible. I'd love to know how to capture lap button presses as well.


    When writing a data field, right now you can't see lap info nor the lap button. There is no way around that.

    You can only guess at lap info when coding a data field.
  • Former Member
    Former Member over 8 years ago
    thanks. What I need to be able to do is determine when the lap button is hit for use in a simpleDataField so that I can reset a counter. I figured that if I could capture the lap button when its pressed using the onKey function, that would do the trick but being a newbie, no luck yet with capturing the button event. Any thoughts?


    As you likely know .. I did an app and I had much better access to things. I did not know you were doing a data field. Sadly it looks like what you want is not possible right now. The laps that I were doing were based on a known distance thus it worked.
  • Former Member
    Former Member over 8 years ago
    thanks all for the responses. It was not obvious that its not possible to catch key events from SimpleDataFields. The programmers guide says that the WatchUi API is visible to DataFields so I assumed that key events would work. I am going to give it a shot using an app. Not as ideal as a data field but better than nothing, for now.

    Is there anywhere besides the Garmin site where I can get documentation on Monkey C. The programming guide is kind of light.
  • With the 2.1.0 preview, looks like there is new stuff for data fields (laps and more)

    From the SDK documentation:

    - (Object) onTimerLap
    The function onTimerLap will be called when a lap is added to the current activity.
    - (Object) onTimerPause
    The function onTimerPause will be called when the activity timer goes from the running state to the paused state.
    - (Object) onTimerReset
    The function onTimerReset will be called when the current activity is ended.
    - (Object) onTimerResume
    The function onTimerResume will be called when the activity timer goes from the paused state to the running state.
    - (Object) onTimerStart
    The function onTimerStart will be called when the activity timer goes from the stopped state to the started state.
    - (Object) onTimerStop
    The function onTimerStop will be called when the activity timer goes from the running state to the stopped state.
  • I changed Chart DF to use onTimerLap(), and in the sim, it works greats! The DF knows when a lap is added, and I can do things for that lap. In this case I save off the lat/lon when a lap occurs, and use that to mark it on the chart where it occurs (they are the orange dots)

  • Thank you, this works great, exactly what I was looking for.