watch app addlap and end session

When creating a session, and using addLap during it,
it seem that when you close your session, a "final" lap is always created.
In my case this add a spurious lap !
is it the usual usage ?
should I take care of that in another way ?
thanks
  • This is normal, You'll also see it with native apps too. When you end the session, there is a lap/split for the data at the end.
  • so i should modify my handling of lap to "avoid" this spurious lap ? or maybe my usage of lap is not a good one ?!
  • There's nothing you can do in your app to avoid this. Even if you did your own addLap just prior to saving, there would be a tiny one right after that.
  • Dunno if this helps, but try thinking of it this way:
    - Every lap has a beginning and an end
    - When you start an activity, that's also the start of the first lap
    - When you end an activity, that's the end of the current lap
    - When the app calls addLap() or the user presses Lap in a built-in activity, that's the end of the current lap and the start of a new one

    So you'll always have at least one lap. Every call to addLap() adds an extra lap.

    Or how about this: Don't think of addLap() as "adding a lap record to the FIT file", think of it as "starting a new lap in the activity".

    When you think of it this way, there's no spurious laps.
  • Dunno if this helps, but try thinking of it this way:
    - Every lap has a beginning and an end
    - When you start an activity, that's also the start of the first lap
    - When you end an activity, that's the end of the current lap
    - When the app calls addLap() or the user presses Lap in a built-in activity, that's the end of the current lap and the start of a new one

    So you'll always have at least one lap. Every call to addLap() adds an extra lap.

    Or how about this: Don't think of addLap() as "adding a lap record to the FIT file", think of it as "starting a new lap in the activity".

    When you think of it this way, there's no spurious laps.


    yes that's more or less what I was thinking to do : add a flag and delay the addLap until the next one and let tha OS add the last one when closing
  • If you are recording something that's 10 of something (miles/minutes/events), you could do an appLap for 1 to 9, and stop and save the session on #10. That could be used if there was a fixed number of things you want marked.