How much data can I store?

Former Member
Former Member

Hello.

I see that Application.Storage allows around 128kb, and each key is limited to 8kb (https://developer.garmin.com/connect-iq/programmers-guide/resource-compiler). Is that the only space I can possibly use in an app?

I want to record a lot of sensor information and later send it to the phone, but 128kb seems rather restrictive. Any ideas for a solution?

  • What you're seeing is the max for Storage.  You could record a .fit and that would get sent to GC when you sync.

  • Former Member
    0 Former Member over 5 years ago in reply to jim_m_58

    Thanks for the answer Jim.

    So I can record as many accelerometer datapoints that I want into a .fit file? Is there a way to find the size limit for that (I'm guessing it is device dependent)? And how would I get that .fit file afterwards? I need to run a machine learning model on the data.

    I'm just getting started, and I'm having a bit of a hard time navigating the documentation.

  • Generally daya isn't written more more than every second, and to write it, your app would be recording an activity, so pretty much the only thing running on the watch.

    The .fit is available if you connect the watch to a pc/mac, or after it syncs to Garmin connect.

  • Former Member
    0 Former Member over 5 years ago in reply to jim_m_58

    So taking the example from here https://developer.garmin.com/connect-iq/api-docs/Toybox/Sensor.html#registerSensorDataListener-instance_method

    How does the session accelerometer data get stored in the session, and what happens in the accel_callback? Do I just implement that how I see fit or does it need to write the SensorData object to the activity session?

    Regarding accessing the .fit file, I need to do it programatically. How does the user grant me access to their data? But I guess that is unrelated to Garmin IQ. But I guess what you're saying is that I don't need any specific code in the iOS/Android app. The sync is all handled by Garmin?

  • While I've not tried it, I think you may have to write what you want using fit contributor.  I'm not sure of the level of detail written to the fit by default.

  • Former Member
    0 Former Member over 5 years ago in reply to jim_m_58

    Thank you for your help Jim. Unfortunately, I don't think Connect IQ is flexible enough for my use case unfortunately. I need high precision accelerometer and gyroscope readings at a high frequency. I could probably live with 25Hz (even if it's kinda low) but there is no timestamp associated with the readings and there's no API access to the gyroscope. Reporting data through the .fit file is also kinda sketchy. It seems like the sensor callback is supposed to calculate some sort of aggregate which can be added to the .fit file via the fit contributor. There is no info on how large the .fit file is allowed to grow. It's really quite a shame that the API is as bad as it is when Garmin devices are such quality products. Anyway, I guess I'll check back in in a few years :D