Swimming Example?

Former Member
Former Member
I'm trying to record swimming, but I'm not sure if it's working. Are there any swimming examples I can look at?

When you run the inbuilt app, it also asks you for the pool size. Do I need to specify this in my app?

Also, I'm picking SPORT_SWIMMING and SUB_SPORT_LAP_SWIMMING; but the activity in history doesn't show the swimming icon (but it does if you record from the inbuilt Swim app)

Does Activity::Info's elapsedDistance and currentSpeed represent the swim in this instance?
  • I know of no working examples, but I've tinkered in this space a little bit.

    You can prompt the user for the pool size, but you have no way to relay this information along to the device, and no way to get it into the fit file for recording. I believe that the distance and speed are calculated using the pool pool that is currently set in the swim activity settings (the setting in the native app).

    I think it would be nice to have the swimming icon for all recorded swim activities, but I believe the icon is set by the native application somehow. It is not inferred from the activity type.

    The elapsedDistance is coming through in my testing (GPS disabled), so it seems to work. In the 30 seconds that I fake-swam through my living room the currentSpeed field was always null.

    Travis
  • Former Member
    Former Member over 10 years ago
    I think it would be nice to have the swimming icon for all recorded swim activities, but I believe the icon is set by the native application somehow. It is not inferred from the activity type.

    Interesting, because running and cycling are automatically set on my activities. CIQ Bug?

    Thanks for your help