Is it possible to read from (and write to) a local file? (Fenix 3)

Former Member
Former Member
I want to write a personal workout check list. All exercises should be user configurable in a flat file that I just upload to the watch. An alternative would be getting the data with a http request - but I don't want to develop an additional smartphone app just to do that.

Is this possible?
  • Not possible. CIQ stuff can not read/write local files. Object Stores is as close at it comes.
  • Former Member
    Former Member
    Object store is part of the binary and can not be changed after compiling, right? That would mean recompiling every time the data changes :-(

    I guess I need to write an android app to provide dynamic data to the Fenix3 app??!
  • Object store is part of the binary and can not be changed after compiling, right? That would mean recompiling every time the data changes :-(

    No. The object store is a mapping between key/value pairs that are persisted. i.e.,

    var list_of_names = [];

    function addName(name) {
    // allocate space for additional name
    var new_names = new [ list_of_names.size() + 1 ];

    // copy all of the existing names
    var i;
    for (i = 0; i < list_of_names.size(); ++i) {
    new_names= list_of_names;
    }

    // append the new name
    new_names= name;

    // take over new array
    list_of_names = new_names;
    }

    function onStart() {
    var names = self.getProperty("Names");
    if (names != null) {
    list_of_names = names;
    }
    }

    function onStop() {
    self.setProperty("Names", list_of_names);
    }
    [/code]
  • Former Member
    Former Member
    Hmmm. But this solution would require to generate all data on the watch itself? That does not sound user friendly.

    In the meantime I was looking into makeJsonRequest. I don't know anything about json but it sounds like a solution: I generate a config file, put it on a web server and load it via makeJsonRequest.
    This should solve my problem. Now I just need to understand how to load a flat file using makeJsonRequest, parsing it shouldn't be a problem :-)
  • Long term, garmin is working on a general way to change this stuff so programs can be configured. Also, someone here wrote a program for the mac or pc to allow simple edits.
  • Former Member
    Former Member
    Thank you! You wouldn't know where to find that program? The search function did not help me a lot :-)