Understanding SDK and target device versions

Hi
Just want to sanity-check something (probably obvious)- I'm looking at using the Storage module to hold some data that I wish to persist for an application. The documentation indicates Storage module has existed since SDK version 2.4.0. When I attempt to configure the simulator for my device, a Forerunner 230, I see that the (compatible?) versions for the target are 1.3 & 1.4. I take this to mean that the Forerunner 230 doesn't support any SDK functionality beyond these versions, and therefore I have no means to persist user data on my device- Is this correct?

David

Top Replies

All Replies

  • There is a difference between Application.Storage and Application.Properties.

    "Storage" is what in the past was called the object store" while "Properties" is used for app settings.

    Typically, when you persist data only used by the app, you use Storage, and if the user can change it from a phone or GE, it's in Properties.

  • But the right syntax is 

    Application.Properties etc... Right ? 

    It depends on the using clause. Either of these would be correct...

    function f() {
        var value = Toybox.Application.Properties.getValue(key);
    }
    

    or

    using Toybox.Application;
    
    function f() {
        var value = Application.Properties.getValue(key);
    }
    

    or

    using Toybox.Application.Properties;
    
    function f() {
        var value = Properties.getValue(key);
    }
    

    You should find that these are listed in order from least efficient to most efficient in terms of code space. i.e., using the last one will use up less memory if you are making many such calls.