Viewing data from my app while activity is running

Hello

i am completely new to CIQ and i would like to know if it is possible to view data from a app that i create, while an activity is running (e.g. the default cycling, walking, etc. app from Garmin that are pre-installed on the watch). I ask because i understand that it is not possible to modify those default apps and add your own fields/code.

I noticed from the forum history that similar question was asked 9y ago and answer back then was that it is not possible. I wonder if it is still the case.

NOTE: i do not need the two apps to exchange data, but user actions like start/pause etc. would have to be seen in both apps.

Thanks in advance

  • Sounds to me you want to write a CIQ data field that can be used with native activities like walking and swimming, where it sees what's happening (start/pause), and add it's own user data

  • Correct. That CIQ data field is calculated with some internal logic in the app and it would use data like time, speed and some specific settings that user configures. Very simple example (makes no sense but just to give an idea):

    New CIQ data filed = av. speed x (User_setting_Param)

    Calculate and update every minute

  • With a data field, you can use much of what's in the CIQ API and calculate many things.  "compute" in the DF gets called every sec, so can gen new data every minute if you want.

    Look at what the DF's in the app store can do.  

  • i am completely new to CIQ and i would like to know if it is possible to view data from a app that i create, while an activity is running (e.g. the default cycling, walking, etc. app from Garmin that are pre-installed on the watch). I ask because i understand that it is not possible to modify those default apps and add your own fields/code.

    To be clear, a CIQ data field is a special kind of CIQ app which can be added by the user to a built-in activity ["default app"]. So the CIQ data field app type implements your use case without *directly* modifying a built-in activity - instead, a CIQ data field augments a built-in activity at the user's choice.

    CIQ data fields are added to an activity in exactly the same way as a native data field: the user edits a data page, modifies the layout if necessary, then assigns a data field to a given position in the layout.

    IOW, a CIQ data field is intended to compute and display a value in a built-in activity. Think of it as a specialized app with limited capabilities that runs "inside" a built-in activity.

    And to be clear, Garmin defines several CIQ app types:

    - Device app / watch face: fully-fledged app which is a complete replacement of built-in activity / app, which is what you seem to be thinking about. This is also referred to as an "app" by Garmin in some contexts, and it's what most users think of when they use the term "app"

    - Data field: limited app that augments built-in activity

    - Music provider: self-explanatory

    - Watch face: self-explanatory

    I mention all of this because it seems like you may be thinking that when we talk about CIQ data field, we just mean a regular CIQ app ("device app") that is written a certain way, but in fact it's a special kind of CIQ app which is designed to do exactly what you're talking about.

    user actions like start/pause etc. would have to be seen in both apps.

    Activity timer events such as start, stop and lap are visible to a CIQ data field.

    See the DataField.onTimer* event handler functions: DataField.onTimerStart, onTimerStop, onTimerLap, etc.

    New CIQ data filed = av. speed x (User_setting_Param)

    Calculate and update every minute

    The idea of the CIQ data field app type is that it computes a value and it returns it to the system, which then displays that value on the screen in the current built-in activity.

    There are two types of CIQ data fields.

    Simple data field:

    - implements the SimpleDataField.compute function which is called once per second by the system. The return value of compute() is displayed in the on-screen data field by the system - this value can be a string, numerical value, time duration, boolean value, or null value

    - this data field does not handle the details of its own display - the system just displays whatever is returned by compute, along with a fixed text label that's determined when the app starts up

    Complex data field:

    - implements the DataField.compute function which is called once per second by the system, and is used by the app to compute whatever data it needs to keep to track of

    - implements the DataField.onUpdate function which is s called once per second by the system, and allows the app to draw whatever it wants in the confines of the data field's section of the data screen layout

    With this framework, your simple example could be implemented very easily.