Local file storage

When this page says "Local Storage" API (http://developer.garmin.com/connect-iq/what-you-can-build/), is it only about the object storage [set,get]Property()?

Is there (available or planned) some sort of file system API? Will users be able to drop a file on the device (say via USB, or companion app sync) for a widget to open and parse?

Thanks!
  • Any answer here?

    I've been working on an app that can basically only work this way (read data files from the watch. Read-only is ok).
    Currently I just hard-code the data in the source file and it's good enough for dev, but if it isn't going to be possible to read a file on the watch by launch, I may as well be working on something else :)

    And I probably need to be able to list the files on the watch as well, even if in a special directory, and then pick one to open.

    Thanks!
  • The page you reference indicates the Local Storage API already exists, and this is the only data storage functionality available, so I'm guessing that this is what you're going to be stuck with. It sounds like the desktop app (Express?) will allow the user to set these properties, so you may be able to leverage that. Or, you might just have to download the data via the makeJsonRequest() and then write it out to properties as needed (you can use properties to describe the names of other properties, giving you a heirarchical file system if necessary).

    Travis
  • Hm, ok. I guess I was seeing properties as only tiny objects, like a configuration value. But you may be right. At least from the doc, nothing seems to prevent me from having a 1MB property.
    Thanks!
  • I have doubts about the amount of memory/storage available on some devices. According to DCRainmaker, the 920XT had about 10.3MB of available storage, and if you're sucking up 10% of that for application data it is likely that you'd be asking for trouble. Do you really need so much data on the device?

    Travis
  • Former Member
    Former Member over 10 years ago
    There are no plans for direct file access in ConnectIQ. While there aren't explicit limits on the object store at this time, there is limited file storage space on devices as mentioned by Travis. You also would not be able to load/store a property that cannot fit into the run time program memory, which is significantly smaller than 1MB. You may be able to send data you need over from a connected phone, but streaming data over the BLE connection does not have high bandwidth, so the transfer speed would need to be taken into consideration.
  • Yes obviously the data will need to be loaded in memory at some point, etc etc.
    Using 10% of storage on the device is not necessarily bad as long as the user wants that data there, and understand what he's doing.

    That being said, 1MB was just a random number. 10kb may be more than enough most of the time. I just really meant "something that is significantly bigger than an integer" ;)
    I think the device/my app may reach other limitations (like drawing speed, or just raw cpu power to process and use all that data) way before I reach this amount of data anyway.

    Speaking of which, is the emulator speed somewhat close to the device speed? or is it really just limited by my desktop compute power?