Issues with recording swimming activity

I'm currently developing custom app for swimming activity. It's going to capture laps, recognize swim style etc. using my own algorithm - not the one delivered by garmin and I'm about to release a beta version to collect user feedback but I have couple issues i would like to solve if possible.

App is build on the top of default swimming activity:

sport=>Activity.SPORT_SWIMMING,
subSport=>Activity.SUB_SPORT_LAP_SWIMMING
1. Once activity is saved the default lap distance in garmin connect is set to 23meters:
It looks like in garmin connect the lap distance is set up as 'custom' by default. I'm handling distance in my metrics by myself but users will see inconsistent distance once synchronized with garmin connect on main activity screen. Is there any way to set by app code the lap distance used by garmin connect for swimming activity?
2. I would like to plot some metrics on graphs shown in garmin connect activity summary but once activity is saved no charts are visible (only the ones delivered by default swimming activity). However if I save activity very early - before default swimming activity captures any metrics/laps - the default charts are not visible but mine are:
Is there any way to force my charts to be displayed? I tried to play around with fitfields id's etc but the behavior is the same.
Thanks in advance for any suggestions.
  • Based on quick testing with the built-in pool swim activity and my toy CIQ app:

    - the built-in pool length field (44) is always specified in metres (in terms of the internal value in the FIT file). The default value for CIQ apps of 22.86 m (internally, 2286) corresponds to 25 yards.

    - the built-in pool length unit field (46) is an enum which specifies whether pool length (and other metrics like distance and pace) should be *displayed* in metres (0 / default) or yards (1). It has no effect on the interpretation of the pool length FIT field, which is always specified in metres. Attempting override this field with a dev field that uses nativeNum has no effect. But if you use the built-in pool swim activity and specify a pool size in yards, you will see that the value is 1, and that the pool size, distance and pace metrics in the Connect activity are all displayed in yards.

    I'm guessing that pool swim guru sets this field anyway, in the hopes that one day it will be supported. (doubt it though.) Probably more chance that it will become an option to createSession (still close to 0).

    Not to state the obvious, but the fact that pool units are controlled by the user's choice of pool size explains:

    - why the device doesn't have separate units settings for pools (except pool totals) (even though it has separate unit settings for many other things)

    - why Connect's singular unit settings have no effect on the metrics displayed by the pool activity

  • I guess I need to live with it. The numbers shown in activity summary - native ones - would be different than the one generated by my app  which would cause frequent feedback from users anyways. Fortunately imperial units are for just a fraction of the market for that app. Thans for all your help