How to access FIT data or activity detail ?

Former Member
Former Member
Hi folks,

I am new to garmin application development. I'd like to build an application that provide additional insight of recorded running sessions. However, I couldn't find a class from the API that could provide the information I need.

What I am looking for is the detail of the session, e.g. the pace and heart rate under specific timestamp. This would allow me to build application that shows how many percent of times the user is under what pace at what heartrate zone. The most close class that contains this detail seems to be Activity.Info, but that doesn't contain the detail I need.

Any suggestion ?

Thanks.
  • Hi folks,

    I am new to garmin application development. I'd like to build an application that provide additional insight of recorded running sessions. However, I couldn't find a class from the API that could provide the information I need.

    What I am looking for is the detail of the session, e.g. the pace and heart rate under specific timestamp. This would allow me to build application that shows how many percent of times the user is under what pace at what heartrate zone. The most close class that contains this detail seems to be Activity.Info, but that doesn't contain the detail I need.

    Any suggestion ?

    Thanks.


    There is none. You need to build it yourself.
  • When you are record a session, the data in activity.getActivityInfo() is there for you to work with.

    You can not access an existing .fit file, but can get data when you are recording one.
  • I just spent 2 hours going through documentation and these forums looking for a way to access the last recorded session - and there is none, what a letdown.

    What I'd like to build is a widget which would display the running/cycling/weights/whatever session and its duration, calories, distance, perhaps training effect and other details at a glance. Something similar to what you see when you go to History > Activities > Today, but only in an easier to access form.

    Could there be an expansion to the API to enable this?
  • Hi,

    I am a beginner user CIQ too, but I'm a programmer, and in my opinion each value available when configuring the built-in views should be accessible to developers as well. Calculation of something that is already computed (some ware in the system) is wasting time, money and battery life.

    Garmin Developer Team, please give us complete strong tool and we will show what your devices can do.

    Thanks,
    Peter
  • Hi,

    I am a beginner user CIQ too, but I'm a programmer, and in my opinion each value available when configuring the built-in views should be accessible to developers as well. Calculation of something that is already computed (some ware in the system) is wasting time, money and battery life.

    Garmin Developer Team, please give us complete strong tool and we will show what your devices can do.

    Thanks,
    Peter


    Much of the stuff that's there is available by way of activity info, Position info, sensor info, activityMonitor info, etc, or within the app itself.

    For example, when you want to record a .fit, based on your app, you also want to enable things like GPS and sensors (HRM, Tempe, etc), and there are a number of callbacks to gather info (like "onPosition" and "sensorData", for example). Just not all in one place, as their values are updated at different points in time (Like Tempe every minute, GPS every few seconds, etc).

    And another example the "Steps" datafield, all you have to do in an app, is save off the step count when you start and display the difference as "steps" in the app, using info from activity monitoring.

    And as another example, "laps" are controlled by the app. It calls "addLap()" to put a lap mark in the .fit file, so the app knows the lap count with no calculation involved, and the app can have more info - like the distance from the last lap mark..

    I guess I don't understand what data you're looking for within an app that's recording a session, with the needed sensors enabled? (that can't be easily calculated..)
  • Hello jim_m_58,

    I can give you a very simple example: please calculate for me "Training Effect" :D. No one is able to do it except First Beat Technology. Next example:
    if a widget works as I just suppose, that in the moment when we leave the widget screen it is stopped and maybe even removed form memory, the calculation of averages or normalized power is simply impossible.

    I understand that, as Wearable Application starts nothing is calculated and the application must do everything it-selfs. However, if application starts a widget this widget should be treated as an extension of the application and must necessarily has access to all public application's data . CIQ API should also contain functions to calculate more complex values, for example. EPOC, which is the basis for the calculation of training effect.

    Therefore, to widgets or data field was not only a toy, they must be treated as an application extension with the ability to access the application's data. Solutions to the problem of communication is a lot and they depends on the structure of the whole system which is unknown to me.
  • Hello jim_m_58,

    I can give you a very simple example: please calculate for me "Training Effect" :D. No one is able to do it except First Beat Technology. Next example:
    if a widget works as I just suppose, that in the moment when we leave the widget screen it is stopped and maybe even removed form memory, the calculation of averages or normalized power is simply impossible.

    I understand that, as Wearable Application starts nothing is calculated and the application must do everything it-selfs. However, if application starts a widget this widget should be treated as an extension of the application and must necessarily has access to all public application's data . CIQ API should also contain functions to calculate more complex values, for example. EPOC, which is the basis for the calculation of training effect.

    Therefore, to widgets or data field was not only a toy, they must be treated as an application extension with the ability to access the application's data. Solutions to the problem of communication is a lot and they depends on the structure of the whole system which is unknown to me.


    I think you're missing some things about the overall architecture of the devices and CIQ. Might I suggest you experiment with some of the sample widgets and apps in the SDK samples. (look at things like "Recording Sample" and "sensors" for activity reording info). Things using CIQ, if it's not running in the foreground, it's not running, so from an app, you can't fire off a widget, for example.